- Timestamp:
- Jan 27, 2010, 12:15:57 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ccr/trunk/p/C0CMED.m
r508 r688 53 53 I $$RPMS^C0CUTIL() D RPMS QUIT 54 54 I ($$VISTA^C0CUTIL())!($$WV^C0CUTIL())!($$OV^C0CUTIL()) D VISTA QUIT 55 RPMS 56 D EXTRACT^C0CMED6(MEDXML,DFN,MEDOUTXML,C0CMFLAG) QUIT 57 VISTA 55 RPMS 56 ;D EXTRACT^C0CMED6(MEDXML,DFN,MEDOUTXML,C0CMFLAG) QUIT 57 N MEDCOUNT S MEDCOUNT=0 58 K ^TMP($J,"MED") 59 N HIST S HIST=$NA(^TMP($J,"MED","HIST")) ; Meds already dispensed 60 N NVA S NVA=$NA(^TMP($J,"MED","NVA")) ; non-VA Meds 61 S @HIST@(0)=0,@NVA@(0)=0 ; At first, they are all empty... (prevent undefined errors) 62 D EXTRACT^C0CMED6(MEDXML,DFN,HIST,.MEDCOUNT,C0CMFLAG) ; Historical OP Meds 63 D:+C0CMFLAG EXTRACT^C0CMED3(MEDXML,DFN,NVA,.MEDCOUNT) ; non-VA Meds 64 I @HIST@(0)>0 D 65 . D CP^C0CXPATH(HIST,MEDOUTXML) 66 . W:$G(DEBUG) "HAS ACTIVE OP MEDS",! 67 I @NVA@(0)>0 D 68 . I @HIST@(0)>0 D INSINNER^C0CXPATH(MEDOUTXML,NVA) 69 . ;E D CP^C0CXPATH(NVA,MEDOUTXML) 70 . W:$G(DEBUG) "HAS NON-VA MEDS",! 71 Q 72 VISTA 58 73 N MEDCOUNT S MEDCOUNT=0 59 74 K ^TMP($J,"MED")
Note:
See TracChangeset
for help on using the changeset viewer.