diff --git a/p/C0CALERT.m b/p/C0CALERT.m index 85fafd7..4964a98 100644 --- a/p/C0CALERT.m +++ b/p/C0CALERT.m @@ -21,8 +21,8 @@ C0CALERT ; CCDCCR/CKU/GPL - CCR/CCD PROCESSING FOR ALERTS ; 09/11/08 W "NO ENTRY FROM TOP",! Q ; -EXTRACT(ALTXML,DFN,ALTOUTXML) ; EXTRACT ALERTS INTO PROVIDED XML TEMPLATE - ; +EXTRACT(ALTXML,DFN,ALTOUTXML,CALLBK) ; EXTRACT ALERTS INTO XML TEMPLATE + ; CALLBACK IF PROVIDED IS CALLED FOR EACH ALLERGY BEFORE MAPPING ; ALTXML AND ALTOUTXML ARE PASSED BY NAME SO GLOBALS CAN BE USED ; ; GET ADVERSE REACTIONS AND ALLERGIES @@ -45,6 +45,7 @@ EXTRACT(ALTXML,DFN,ALTOUTXML) ; EXTRACT ALERTS INTO PROVIDED XML TEMPLATE . K @ALTVMAP . S @ALTVMAP@("ALERTOBJECTID")="ALERT"_ALTCNT . N A1 S A1=@ALTG@(ALTTMP) ; ALL THE PIECES + . I $D(CALLBK) D @CALLBK ;CALLBACK FOR EPRESCRIBING . N A2 S A2=$$GET1^DIQ(120.8,ALTTMP,"MECHANISM","I") ; MECHANISM . N A3 S A3=$P(A1,U,5) ; ADVERSE FLAG . N ADT S ADT="Patient has an " ; X $ZINT H 5 diff --git a/p/C0CRNF.m b/p/C0CRNF.m index 523b94a..ea983d5 100644 --- a/p/C0CRNF.m +++ b/p/C0CRNF.m @@ -339,14 +339,17 @@ RNF2HNV(ZOUT,ZIN) ;RETURN AN HTML TABLE IN ZOUT, PASSED BY NAME ; OF ZIN, WHICH IS PASSED BY NAME AND IS IN RNF2 FORMAT ; ZOUT IS NOT INITIALIZED, SO THE TABLE WILL GO AT THE END ; THE TABLE WILL BE IN NV FORMAT, ROWS ARE NAMES COLUMNS ARE VALUES - D PUSH^C0CXPATH(ZOUT,"") + D PUSH^C0CXPATH(ZOUT,"
") N ZI,ZJ,ZV,ZN S ZI="" S ZJ=0 D PUSH^C0CXPATH(ZOUT,"") ;begin row and leave a blank col F S ZJ=$O(@ZIN@("V",ZJ)) Q:+ZJ=0 D ; FOR EACH OCCURANCE . S ZV="" ; OCCURANCE AS COLUMNS HEADER + . D PUSH^C0CXPATH(ZOUT,ZV) D PUSH^C0CXPATH(ZOUT,"") ;end of first row + S ZI="" F S ZI=$O(@ZIN@("F",ZI)) Q:ZI="" D ; FOR EACH VARIABLE . S ZN="" ; VARIABLE NAME IN FIRST COLUMN + . D PUSH^C0CXPATH(ZOUT,ZN) . S ZJ=0 ;RESET TO DO IT AGAIN . F S ZJ=$O(@ZIN@("V",ZJ)) Q:+ZJ=0 D ; FOR EACH OCCURANCE . . S ZV="" @@ -359,7 +362,7 @@ RNF2HVN(ZOUT,ZIN) ;RETURN AN HTML TABLE IN ZOUT, PASSED BY NAME ; OF ZIN, WHICH IS PASSED BY NAME AND IS IN RNF2 FORMAT ; ZOUT IS NOT INITIALIZED, SO THE TABLE WILL GO AT THE END ; THE TABLE WILL BE IN VN FORMAT, ROWS ARE VALUES COLUMNS ARE NAMES - D PUSH^C0CXPATH(ZOUT,"
"_ZJ_"
"_ZI_""_$G(@ZIN@("V",ZJ,ZI,1))_"
") + D PUSH^C0CXPATH(ZOUT,"
") N ZI,ZJ S ZI="" S ZJ=0 D PUSH^C0CXPATH(ZOUT,"") ;new row for column headers F S ZI=$O(@ZIN@("F",ZI)) Q:ZI="" D ; FOR EACH VARIABLE