updates to ALERT AND RNF for eRx
This commit is contained in:
parent
cce588553b
commit
d547323774
|
@ -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
|
||||
|
|
|
@ -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,"<table>")
|
||||
D PUSH^C0CXPATH(ZOUT,"<table border=""1"">")
|
||||
N ZI,ZJ,ZV,ZN S ZI="" S ZJ=0
|
||||
D PUSH^C0CXPATH(ZOUT,"<tr><td></td>") ;begin row and leave a blank col
|
||||
F S ZJ=$O(@ZIN@("V",ZJ)) Q:+ZJ=0 D ; FOR EACH OCCURANCE
|
||||
. S ZV="<td>"_ZJ_"</td>" ; OCCURANCE AS COLUMNS HEADER
|
||||
. D PUSH^C0CXPATH(ZOUT,ZV)
|
||||
D PUSH^C0CXPATH(ZOUT,"</tr>") ;end of first row
|
||||
S ZI=""
|
||||
F S ZI=$O(@ZIN@("F",ZI)) Q:ZI="" D ; FOR EACH VARIABLE
|
||||
. S ZN="<tr><td>"_ZI_"</td>" ; 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="<td>"_$G(@ZIN@("V",ZJ,ZI,1))_"</td>"
|
||||
|
@ -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,"<table>")
|
||||
D PUSH^C0CXPATH(ZOUT,"<table border=""1"">")
|
||||
N ZI,ZJ S ZI="" S ZJ=0
|
||||
D PUSH^C0CXPATH(ZOUT,"<tr>") ;new row for column headers
|
||||
F S ZI=$O(@ZIN@("F",ZI)) Q:ZI="" D ; FOR EACH VARIABLE
|
||||
|
|
Loading…
Reference in New Issue