Changeset 688 for ccr/trunk/p


Ignore:
Timestamp:
Jan 27, 2010, 12:15:57 PM (15 years ago)
Author:
Christopher Edwards
Message:

chained C0CMED3 & C0CMED6 together to get non-va meds for RPMS

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ccr/trunk/p/C0CMED.m

    r508 r688  
    5353 I $$RPMS^C0CUTIL() D RPMS QUIT
    5454 I ($$VISTA^C0CUTIL())!($$WV^C0CUTIL())!($$OV^C0CUTIL()) D VISTA QUIT
    55 RPMS   
    56  D EXTRACT^C0CMED6(MEDXML,DFN,MEDOUTXML,C0CMFLAG) QUIT
    57 VISTA   
     55RPMS
     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
     72VISTA
    5873 N MEDCOUNT S MEDCOUNT=0
    5974 K ^TMP($J,"MED")
Note: See TracChangeset for help on using the changeset viewer.