fixing Alerts and skipping non-VA meds unless flag TESTMEDS is set

This commit is contained in:
george 2008-10-27 16:08:40 +00:00
parent 3ba3f81e8f
commit 77765c886a
2 changed files with 10 additions and 3 deletions

View File

@ -54,6 +54,7 @@ EXTRACT(MEDXML,DFN,MEDOUTXML) ; EXTRACT MEDICATIONS INTO PROVIDED XML TEMPLATE
. S MEDCNT=MEDCNT+@MEDTVMAP@(0) ; SAVE COUNT TO KNOW HOW TO ADD TO MAP
. ; W MEDCNT,!
. W "HAS OP PENDING MEDS",!
IF '$D(TESTMEDS) G THEND ; SKIP NON-VA MEDS FOR NOW
N PENDINGXML,MEDPENDING
S PENDINGXML="MEDPENDING" ;NAME FOR ARRAY
D EXTRACT^CCRMEDS3(MEDXML,DFN,PENDINGXML) ; FIRST EXTRACT OUTPATIENT MEDS
@ -65,7 +66,9 @@ EXTRACT(MEDXML,DFN,MEDOUTXML) ; EXTRACT MEDICATIONS INTO PROVIDED XML TEMPLATE
. S MEDCNT=MEDCNT+@MEDTVMAP@(0) ; SAVE COUNT TO KNOW HOW TO ADD TO MAP
. ; W MEDCNT,!
. W "HAS NON-VA MEDS",!
Q
THEND ;
Q ; SKIPPING ALL THE REST OF THIS LOGIC.. IT IS NOT GOING TO BE NEEDED
; ONCE NON-VA AND IP MEDS WORK (CCRMEDS3 AND CCRMEDS4)
N MEDRSLT,I,J,K,MEDPTMP,X,MEDVMAP,TBUF
D ACTIVE^ORWPS(.MEDRSLT,DFN)
I '$D(MEDRSLT(1)) D ; NO MEDS FOR THIS PATIENT, EXIT

View File

@ -55,8 +55,12 @@ EXTRACT(ALTXML,DFN,ALTOUTXML) ; EXTRACT ALERTS INTO PROVIDED XML TEMPLATE
. S @ALTVMAP@("ALERTCODEVALUE")=ALTCDE ;
. ; WILL USE 418634005 FOR ALLERGIC REACTION TO A SUBSTANCE
. ; AND 282100009 FOR ADVERSE REACTION TO A SUBSTANCE
. S @ALTVMAP@("ALERTCODESYSTEM")="SNOMED CT"
. S @ALTVMAP@("ALERTCODESYSTEMVERSION")="2008"
. I ALTCDE'="" D ; IF THERE IS A CODE
. . S @ALTVMAP@("ALERTCODESYSTEM")="SNOMED CT"
. . S @ALTVMAP@("ALERTCODESYSTEMVERSION")="2008"
. E D ; SET TO NULL
. . S @ALTVMAP@("ALERTCODESYSTEM")=""
. . S @ALTVMAP@("ALERTCODESYSTEMVERSION")=""
. S @ALTVMAP@("ALERTSTATUSTEXT")="" ; WHERE DO WE GET THIS?
. N ALTPROV S ALTPROV=$P(^GMR(120.8,ALTTMP,0),U,5) ; SOURCE PROVIDER IEN
. I ALTPROV'="" D ; PROVIDER PROVIDEED