Changeset 70


Ignore:
Timestamp:
Jul 21, 2008, 3:54:56 PM (16 years ago)
Author:
Christopher Edwards
Message:

added placeholders in GPLMEDS.m for values
added comment in GPLCCR.m describing order of CCR Body
added processing of MEDS in GPLCCR.m (commented out)

Location:
ccr/trunk/p
Files:
2 edited

Legend:

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

    r60 r70  
    100100    ; TAB IS PASSED BY NAME
    101101    W "TAB= ",TAB,!
     102    ; ORDER FOR CCR IS PROBLEMS,FAMILYHISTORY,SOCIALHISTORY,MEDICATIONS,VITALSIGNS,RESULTS,HEALTHCAREPROVIDERS
    102103    D PUSH^GPLXPATH(TAB,"EXTRACT;GPLPROBS;//ContinuityOfCareRecord/Body/Problems;^TMP(""GPLCCR"",$J,DFN,""PROBLEMS"")")
     104    ;D PUSH^GPLXPATH(TAB,"EXTRACT;GPLMEDS;//ContinuityOfCareRecord/Body/Medications;^TMP(""GPLCCR"",$J,DFN,""MEDICATIONS"")")
    103105    D PUSH^GPLXPATH(TAB,"EXTRACT;GPLVITALS;//ContinuityOfCareRecord/Body/VitalSigns;^TMP(""GPLCCR"",$J,DFN,""VITALS"")")
    104106    Q
  • ccr/trunk/p/GPLMEDS.m

    r65 r70  
    1 GPLVITALS ; CCDCCR/CJE - CCR/CCD PROCESSING FOR MEDICATIONS ; 07/16/08
     1GPLMEDS ; CCDCCR/CJE - CCR/CCD PROCESSING FOR MEDICATIONS ; 07/16/08
    22 ;;0.1;CCDCCR;;JUL 16,2008;
    33 ;Copyright 2008 WorldVistA.  Licensed under the terms of the GNU
     
    1818 ;51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
    1919 ;
    20           W "NO ENTRY FROM TOP",!
    21           W !
    22           Q
    23           ;
     20 W "NO ENTRY FROM TOP",!
     21 W !
     22 Q
     23 ;
    2424EXTRACT(MEDXML,DFN,MEDOUTXML)          ; EXTRACT MEDICATIONS INTO PROVIDED XML TEMPLATE
    2525          ;
     
    2828          ;
    2929          N MEDRSLT,J,K,MEDPTMP,X,MEDVMAP,TBUF
    30           ; REPLACE ME WITH MEDS RPC!!
     30          D ACTIVE^ORWPS(.MEDRSLT,DFN)
     31          ZWR MEDRSLT
     32          Q
    3133          I '$D(MEDRSLT(1)) W "ERROR RUNNINIG MEDICATIONS RPC",! Q
    32           ; ZWR RPCRSLT
    33           S MEDTVMAP=$NA(^TMP("GPLCCR",$J,"VITALS"))
    34           S MEDTARYTMP=$NA(^TMP("GPLCCR",$J,"VITALARYTMP"))
    35           F J=1:1:MEDRSLT(1)  D  ; FOR EACH MEDICATION IN THE LIST
    36           . I $D(MEDRSLT(J)) D
    37           . . S MEDVMAP=$NA(@MEDTVMAP@(J))
    38           . . K @MEDVMAP
    39           . . I DEBUG W "VMAP= ",VMAP,!
    40           . . S MEDPTMP=MEDRSLT(J) ; PULL OUT MEDICATION FROM RPC RETURN ARRAY
    41           . . S @MEDVMAP@("MEDDATAOBJECTID")="VITAL"_J ; UNIQUE OBJID FOR MEDICATION
    42           . . ; PROCESSING FOR MEDS GOES HERE
    43           . . S MEDARYTMP=$NA(@MEDTARYTMP@(J))
    44           . . K @MEDARYTMP
    45           . . D MAP^GPLXPATH(MEDXML,MEDVMAP,MEDARYTMP)
    46           . . I J=1 D  ; FIRST ONE IS JUST A COPY
    47           . . . ; W "FIRST ONE",!
    48           . . . D CP^GPLXPATH(MEDARYTMP,MEDOUTXML)
    49           . . . ; W "OUTXML ",OUTXML,!
    50           . . I J>1 D  ; AFTER THE FIRST, INSERT INNER XML
    51           . . . D INSINNER^GPLXPATH(MEDOUTXML,MEDARYTMP)
    52           ; ZWR ^TMP($J,"VITALS",*)
    53           ; ZWR ^TMP($J,"VITALARYTMP",*) ; SHOW THE RESULTS
    54           ; ZWR @OUTXML
     34          S MEDTVMAP=$NA(^TMP("GPLCCR",$J,"MEDICATIONS"))
     35          S MEDTARYTMP=$NA(^TMP("GPLCCR",$J,"MEDARYTMP"))
     36          F J=1:1 Q:'$D(MEDRSLT(J))  D  ; FOR EACH MEDICATION IN THE LIST
     37          . S MEDVMAP=$NA(@MEDTVMAP@(J))
     38          . K @MEDVMAP
     39          . I DEBUG W "VMAP= ",VMAP,!
     40          . S MEDPTMP=MEDRSLT(J) ; PULL OUT MEDICATION FROM RPC RETURN ARRAY
     41          . S @MEDVMAP@("MEDICATIONOBJECTID")="MED"_J ; UNIQUE OBJID FOR MEDICATION
     42          . ; PROCESSING FOR MEDS GOES HERE
     43          . S @MEDVMAP@("MEDICATIONDATETIMETEXT")=$$FMDTOUTC^CCRUTIL($P(MEDPTMP,"^",11),"DT")
     44          . S @MEDVMAP@("MEDICATIONDATETIMEAGE")="TEST2"
     45          . S @MEDVMAP@("MEDICATIONDATETIMEAGEUNITS")="TEST3"
     46          . S @MEDVMAP@("MEDICATIONTYPETEXT")="TEST4"
     47          . S @MEDVMAP@("MEDICATIONSTATUSTEXT")=$P(MEDPTMP,"^",10)
     48          . S @MEDVMAP@("MEDICATIONSOURCEACTORID")="TEST6"
     49          . S @MEDVMAP@("MEDICATIONPRODUCTNAMETEXT")="TEST7"
     50          . S @MEDVMAP@("MEDICATIONPRODUCTNAMECODEVALUE")="TEST8"
     51          . S @MEDVMAP@("MEDICATIONPRODUCTNAMECODINGINGSYSTEM")="TEST9"
     52          . S @MEDVMAP@("MEDICATIONPRODUCTNAMECODEVERSION")="TEST10"
     53          . S @MEDVMAP@("MEDICATIONBRANDNAMETEXT")="TEST11"
     54          . S @MEDVMAP@("MEDICATIONBRANDNAMECODEVALUE")="TEST12"
     55          . S @MEDVMAP@("MEDICATIONBRANDNAMECODINGSYSTEM")="TEST13"
     56          . S @MEDVMAP@("MEDICATIONBRANDNAMECODEVERSION")="TEST14"
     57          . S @MEDVMAP@("MEDICATIONSTRENGTHVALUE")="TEST15"
     58          . S @MEDVMAP@("MEDICATIONSTRENGTHUNIT")="TEST16"
     59          . S @MEDVMAP@("MEDICATIONFORMTEXT")="TEST17"
     60          . S @MEDVMAP@("MEDICATIONDIRECTIONDESCRIPTIONTEXT")="TEST18"
     61          . S @MEDVMAP@("MEDICATIONDIRECTIONDOSEVALUE")="TEST19"
     62          . S @MEDVMAP@("MEDICATIONDIRECTIONROUTETEXT")="TEST20"
     63          . S @MEDVMAP@("MEDICATIONDIRECTIONFREQUENCYVALUE")="TEST21"
     64          . S J=J+3
     65          . S MEDARYTMP=$NA(@MEDTARYTMP@(J))
     66          . K @MEDARYTMP
     67          . D MAP^GPLXPATH(MEDXML,MEDVMAP,MEDARYTMP)
     68          . I J=1 D  ; FIRST ONE IS JUST A COPY
     69          . . ; W "FIRST ONE",!
     70          . . D CP^GPLXPATH(MEDARYTMP,MEDOUTXML)
     71          . I J>1 D  ; AFTER THE FIRST, INSERT INNER XML
     72          . . D INSINNER^GPLXPATH(MEDOUTXML,MEDARYTMP)
    5573          N MEDTMP,I
    5674          D MISSING^GPLXPATH(MEDOUTXML,"MEDTMP") ; SEARCH XML FOR MISSING VARS
Note: See TracChangeset for help on using the changeset viewer.