Changeset 421 for ccr/trunk/p/C0CMED3.m
- Timestamp:
- Mar 29, 2009, 4:19:05 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ccr/trunk/p/C0CMED3.m
r416 r421 22 22 Q 23 23 ; 24 EXTRACT(MINXML,DFN,OUTXML) ; Extract medications into provided xml template 25 ; 26 ; MINXML is the Input XML Template, passed by name 27 ; DFN is Patient IEN 28 ; OUTXML is the resultant XML. 24 EXTRACT(MINXML,DFN,OUTXML,MEDCOUNT) ; Extract medications into provided xml template 25 ; 26 ; MINXML is the Input XML Template, (passed by name) 27 ; DFN is Patient IEN (passed by value) 28 ; OUTXML is the resultant XML (passed by name) 29 ; MEDCOUNT is the number of Meds extracted so far (passed by reference) 29 30 ; 30 31 ; MEDS is return array from RPC. … … 39 40 N MEDS,MAP 40 41 K ^TMP($J,"CCDCCR") ; PLEASE DON'T KILL ALL OF ^TMP($J) HERE!!!! 41 KNVA42 N NVA 42 43 D GETS^DIQ(55,DFN,"52.2*","IE","NVA") ; Output in NVA in FDA array format. 43 44 ; If NVA does not exist, then patient has no non-VA meds … … 50 51 I DEBUG ZWR MEDS 51 52 N FDAIEN S FDAIEN=0 ; For use in $Order in the MEDS array. 52 S MEDMAP=$NA(^TMP("C0CCCR",$J,"MEDMAP"))53 N MEDCOUNT S MEDCOUNT=@MEDMAP@(0) ; We already have meds in the array54 53 N MEDFIRST S MEDFIRST=1 ; FLAG FOR FIRST MED PROCESSED HERE 55 54 F S FDAIEN=$O(MEDS(FDAIEN)) Q:FDAIEN="" D ; FOR EACH MEDICATION IN THE LIST … … 58 57 . S MEDCOUNT=MEDCOUNT+1 59 58 . S MAP=$NA(^TMP("C0CCCR",$J,"MEDMAP",MEDCOUNT)) 60 . S @MEDMAP@(0)=@MEDMAP@(0)+1 ; INCREMENT TOTAL MEDS IN VAR ARRAY61 59 . N RXIEN S RXIEN=$P(FDAIEN,",") ; First piece of FDAIEN is the number of the med for this patient 62 60 . I DEBUG W "RXIEN IS ",RXIEN,!
Note:
See TracChangeset
for help on using the changeset viewer.