Changeset 687


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

changed issue date to report as date/time instead of just date
added medcount variable so it can be chained with C0CMED3

File:
1 edited

Legend:

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

    r593 r687  
    1 C0CMED6 ; WV/CCDCCR/SMH - Meds from RPMS: Outpatient Meds;01/10/09
     1C0CMED6 ; WV/CCDCCR/SMH - Meds from RPMS: Outpatient Meds;01/10/09
    22 ;;1.0;C0C;;May 19, 2009;
    33 ; Copyright 2008 WorldVistA.  Licensed under the terms of the GNU
     
    2121 Q
    2222 ;
    23 EXTRACT(MINXML,DFN,OUTXML,FLAGS)        ; EXTRACT MEDICATIONS INTO PROVIDED XML TEMPLATE
     23EXTRACT(MINXML,DFN,OUTXML,MEDCOUNT,FLAGS) ; EXTRACT MEDICATIONS INTO PROVIDED XML TEMPLATE
    2424 ;
    2525 ; MINXML and OUTXML are passed by name so globals can be used
    2626 ; MINXML will contain only the medications skeleton of the overall template
     27 ; MEDCOUNT is a counter passed by Reference.
    2728 ; FLAGS are: MEDALL(bool)^MEDLIMIT(int)^MEDACTIVE(bool)^MEDPENDING(bool)
    2829 ; FLAGS are set-up in C0CMED.
     
    4142 ; -- DAYS is passed by value (optional; if not passed defaults to 365)
    4243 ;
    43  ; Return: 
    44  ;    ~Type(1)^PharmID(2)^Drug(3)^InfRate(4)^StopDt(5)^RefRem(6)^
    45  ;    TotDose(7)^UnitDose(8)^OrderID(9)^Status(10)^LastFill(11)^
    46  ;    Days Supply(12)^Quantity(13)^Chronic(14)^Issued(15)^
    47  ;    Rx #(16)^Provider(17)^Status Reason(18)^DEA Handling(19)^
    48  ;    Pharmacy Site(20)
     44 ; Return:
     45 ; ~Type^PharmID^Drug^InfRate^StopDt^RefRem^TotDose^UnitDose^OrderID
     46 ; ^Status^LastFill^Chronic^Issued^Rx #^Provider^
     47 ; Status Reason^DEA Handling
    4948 ;
    5049 N MEDS,MEDS1,MAP
     
    7675 . S @MAP@("MEDOBJECTID")="MED"_MEDCNT ; MEDCNT FOR ID
    7776 . S @MAP@("MEDISSUEDATETXT")="Issue Date"
    78  . S @MAP@("MEDISSUEDATE")=$$FMDTOUTC^C0CUTIL($P(MEDS(MEDCNT),U,15))
     77 . S @MAP@("MEDISSUEDATE")=$$FMDTOUTC^C0CUTIL($P(MEDS(MEDCNT),U,15),"DT")
    7978 . S @MAP@("MEDLASTFILLDATETXT")="Last Fill Date"
    80  . S @MAP@("MEDLASTFILLDATE")=$$FMDTOUTC^C0CUTIL($P(MEDS(MEDCNT),U,11))
     79 . S @MAP@("MEDLASTFILLDATE")=$$FMDTOUTC^C0CUTIL($P(MEDS(MEDCNT),U,11),"DT")
    8180 . S @MAP@("MEDRXNOTXT")="Prescription Number"
    82  . S @MAP@("MEDRXNO")=$P(MEDS(MEDCNT),U,16)
     81 . S @MAP@("MEDRXNO")=$P(MEDS(MEDCNT),U,14)
    8382 . S @MAP@("MEDTYPETEXT")="Medication"
    8483 . S @MAP@("MEDDETAILUNADORNED")=""  ; Leave blank, field has its uses
     
    299298 . D:MEDCNT=1 CP^C0CXPATH(RESULT,OUTXML) ; First one is a copy
    300299 . D:MEDCNT>1 INSINNER^C0CXPATH(OUTXML,RESULT) ; AFTER THE FIRST, INSERT INNER XML
     300 . S MEDCOUNT=MEDCNT
    301301 N MEDTMP,MEDI
    302302 D MISSING^C0CXPATH(OUTXML,"MEDTMP") ; SEARCH XML FOR MISSING VARS
Note: See TracChangeset for help on using the changeset viewer.