Changeset 79 for ccr/trunk


Ignore:
Timestamp:
Jul 30, 2008, 10:00:08 AM (16 years ago)
Author:
Christopher Edwards
Message:

added processing for meds in GPLCCR.m
added <description><text></text></description> for meds in GPLCCR0.m
changed I variables in GPLCCR.m so that it would run

Location:
ccr/trunk/p
Files:
3 edited

Legend:

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

    r77 r79  
    3131       S ODIRGLB=$NA(^TMP("GPLCCR","ODIR"))
    3232       I '$D(@ODIRGLB) D  ; IF NOT ODIR HAS BEEN SET
    33        . S @ODIRGLB="/home/glilly/CCROUT"
    34        . ;S @ODIRGLB="/home/cedwards/"
     33       . ;S @ODIRGLB="/home/glilly/CCROUT"
     34       . S @ODIRGLB="/home/cedwards/"
    3535       . ;S @ODIRGLB="/opt/wv/p/"
    3636       S ODIR=@ODIRGLB
     
    7272    S CCRXTAB=$NA(^TMP("GPLCCR",$J,"CCRSTEP")) ; GLOBAL TO STORE CCR STEPS
    7373    D INITSTPS(CCRXTAB) ; INITIALIZED CCR PROCESSING STEPS
    74     N I,XI,TAG,RTN,CALL,XPATH,IXML,OXML,INXML,CCRBLD
    75     F I=1:1:@CCRXTAB@(0)  D  ; PROCESS THE CCR BODY SECTIONS
    76     . S XI=@CCRXTAB@(I) ; CALL COPONENTS TO PARSE
     74    N PROCI,XI,TAG,RTN,CALL,XPATH,IXML,OXML,INXML,CCRBLD
     75    F PROCI=1:1:@CCRXTAB@(0)  D  ; PROCESS THE CCR BODY SECTIONS
     76    . S XI=@CCRXTAB@(PROCI) ; CALL COPONENTS TO PARSE
    7777    . S RTN=$P(XI,";",2) ; NAME OF ROUTINE TO CALL
    7878    . S TAG=$P(XI,";",1) ; LABEL INSIDE ROUTINE TO CALL
     
    9292    D EXTRACT^GPLACTORS("ACTT",ACTGLO,"ACTT2")
    9393    D INSINNER^GPLXPATH(CCRGLO,"ACTT2","//ContinuityOfCareRecord/Actors")
    94     N I,J,DONE S DONE=0
    95     F I=0:0 D  Q:DONE ; DELETE UNTIL ALL EMPTY ELEMENTS ARE GONE
     94    N TRIMI,J,DONE S DONE=0
     95    F TRIMI=0:0 D  Q:DONE ; DELETE UNTIL ALL EMPTY ELEMENTS ARE GONE
    9696    . S J=$$TRIM^GPLXPATH(CCRGLO) ; DELETE EMPTY ELEMENTS
    9797    . W "TRIMMED",J,!
     
    104104    ; ORDER FOR CCR IS PROBLEMS,FAMILYHISTORY,SOCIALHISTORY,MEDICATIONS,VITALSIGNS,RESULTS,HEALTHCAREPROVIDERS
    105105    D PUSH^GPLXPATH(TAB,"EXTRACT;GPLPROBS;//ContinuityOfCareRecord/Body/Problems;^TMP(""GPLCCR"",$J,DFN,""PROBLEMS"")")
    106     ;D PUSH^GPLXPATH(TAB,"EXTRACT;GPLMEDS;//ContinuityOfCareRecord/Body/Medications;^TMP(""GPLCCR"",$J,DFN,""MEDICATIONS"")")
     106    D PUSH^GPLXPATH(TAB,"EXTRACT;GPLMEDS;//ContinuityOfCareRecord/Body/Medications;^TMP(""GPLCCR"",$J,DFN,""MEDICATIONS"")")
    107107    D PUSH^GPLXPATH(TAB,"EXTRACT;GPLVITALS;//ContinuityOfCareRecord/Body/VitalSigns;^TMP(""GPLCCR"",$J,DFN,""VITALS"")")
    108108    I TESTLAB D PUSH^GPLXPATH(TAB,"EXTRACT;GPLLABS;//ContinuityOfCareRecord/Body/Results;^TMP(""GPLCCR"",$J,DFN,""RESULTS"")")
  • ccr/trunk/p/GPLCCR0.m

    r78 r79  
    284284 ;;<Text>@@MEDICATIONTYPETEXT@@</Text>
    285285 ;;</Type>
     286 ;;<Description>
     287 ;;<Text>@@MEDICATIONDESCRIPTIONTEXT@@</Text>
     288 ;;</Description>
    286289 ;;<Status>
    287290 ;;<Text>@@MEDICATIONSTATUSTEXT@@</Text>
  • ccr/trunk/p/GPLMEDS.m

    r73 r79  
    2828          N MEDRSLT,J,K,MEDPTMP,X,MEDVMAP,TBUF
    2929          D ACTIVE^ORWPS(.MEDRSLT,DFN)
    30           Q
     30          ZWR MEDRSLT
    3131          I '$D(MEDRSLT(1)) W "ERROR RUNNINIG MEDICATIONS RPC",! Q
    3232          S MEDTVMAP=$NA(^TMP("GPLCCR",$J,"MEDICATIONS"))
    3333          S MEDTARYTMP=$NA(^TMP("GPLCCR",$J,"MEDARYTMP"))
    3434          F J=1:1 Q:'$D(MEDRSLT(J))  D  ; FOR EACH MEDICATION IN THE LIST
     35          . W "J IS",J,!
    3536          . S MEDVMAP=$NA(@MEDTVMAP@(J))
    3637          . K @MEDVMAP
     
    3940          . S @MEDVMAP@("MEDICATIONOBJECTID")="MED"_J ; UNIQUE OBJID FOR MEDICATION
    4041          . ; PROCESSING FOR MEDS GOES HERE
    41           . S @MEDVMAP@("MEDICATIONDATETIMETEXT")=$$FMDTOUTC^CCRUTIL($P(MEDPTMP,"^",11),"DT")
    42           . S @MEDVMAP@("MEDICATIONDATETIMEAGE")="TEST2"
    43           . S @MEDVMAP@("MEDICATIONDATETIMEAGEUNITS")="TEST3"
    44           . S @MEDVMAP@("MEDICATIONTYPETEXT")="TEST4"
    45           . S @MEDVMAP@("MEDICATIONSTATUSTEXT")=$P(MEDPTMP,"^",10)
    46           . S @MEDVMAP@("MEDICATIONSOURCEACTORID")="TEST6"
    47           . S @MEDVMAP@("MEDICATIONPRODUCTNAMETEXT")="TEST7"
    48           . S @MEDVMAP@("MEDICATIONPRODUCTNAMECODEVALUE")="TEST8"
    49           . S @MEDVMAP@("MEDICATIONPRODUCTNAMECODINGINGSYSTEM")="TEST9"
    50           . S @MEDVMAP@("MEDICATIONPRODUCTNAMECODEVERSION")="TEST10"
    51           . S @MEDVMAP@("MEDICATIONBRANDNAMETEXT")="TEST11"
    52           . S @MEDVMAP@("MEDICATIONBRANDNAMECODEVALUE")="TEST12"
    53           . S @MEDVMAP@("MEDICATIONBRANDNAMECODINGSYSTEM")="TEST13"
    54           . S @MEDVMAP@("MEDICATIONBRANDNAMECODEVERSION")="TEST14"
    55           . S @MEDVMAP@("MEDICATIONSTRENGTHVALUE")="TEST15"
    56           . S @MEDVMAP@("MEDICATIONSTRENGTHUNIT")="TEST16"
    57           . S @MEDVMAP@("MEDICATIONFORMTEXT")="TEST17"
    58           . S @MEDVMAP@("MEDICATIONDIRECTIONDESCRIPTIONTEXT")="TEST18"
    59           . S @MEDVMAP@("MEDICATIONDIRECTIONDOSEVALUE")="TEST19"
    60           . S @MEDVMAP@("MEDICATIONDIRECTIONROUTETEXT")="TEST20"
    61           . S @MEDVMAP@("MEDICATIONDIRECTIONFREQUENCYVALUE")="TEST21"
    62           . S J=J+3
     42          . S @MEDVMAP@("MEDICATIONDATETIMETEXT")=$$FMDTOUTC^CCRUTIL($P(MEDPTMP,"^",11),"DT") ; GETS LAST FILL DATE
     43          . S @MEDVMAP@("MEDICATIONDATETIMEAGE")=""
     44          . S @MEDVMAP@("MEDICATIONDATETIMEAGEUNITS")=""
     45          . S @MEDVMAP@("MEDICATIONTYPETEXT")="Medication"
     46          . S @MEDVMAP@("MEDICATIONSTATUSTEXT")=$P(MEDPTMP,"^",10) ; STATUS FROM RPC
     47          . S @MEDVMAP@("MEDICATIONSOURCEACTORID")=""
     48          . S @MEDVMAP@("MEDICATIONPRODUCTNAMETEXT")=$P(MEDPTMP,"^",3)
     49          . S @MEDVMAP@("MEDICATIONPRODUCTNAMECODEVALUE")=""
     50          . S @MEDVMAP@("MEDICATIONPRODUCTNAMECODINGINGSYSTEM")=""
     51          . S @MEDVMAP@("MEDICATIONPRODUCTNAMECODEVERSION")=""
     52          . S @MEDVMAP@("MEDICATIONBRANDNAMETEXT")=""
     53          . S @MEDVMAP@("MEDICATIONBRANDNAMECODEVALUE")=""
     54          . S @MEDVMAP@("MEDICATIONBRANDNAMECODINGSYSTEM")=""
     55          . S @MEDVMAP@("MEDICATIONBRANDNAMECODEVERSION")=""
     56          . S @MEDVMAP@("MEDICATIONSTRENGTHVALUE")=""
     57          . S @MEDVMAP@("MEDICATIONSTRENGTHUNIT")=""
     58          . S @MEDVMAP@("MEDICATIONFORMTEXT")=""
     59          . S J=J+1
     60          . S @MEDVMAP@("MEDICATIONDESCRIPTIONTEXT")=$P(MEDRSLT(J)," *",2)
     61          . S J=J+1
     62          . S @MEDVMAP@("MEDICATIONDIRECTIONDESCRIPTIONTEXT")=$P(MEDRSLT(J),"\ Sig: ",2)
     63          . S @MEDVMAP@("MEDICATIONDIRECTIONDOSEVALUE")=""
     64          . S @MEDVMAP@("MEDICATIONDIRECTIONROUTETEXT")=""
     65          . S @MEDVMAP@("MEDICATIONDIRECTIONFREQUENCYVALUE")=""
    6366          . S MEDARYTMP=$NA(@MEDTARYTMP@(J))
    6467          . K @MEDARYTMP
    6568          . D MAP^GPLXPATH(MEDXML,MEDVMAP,MEDARYTMP)
    66           . I J=1 D  ; FIRST ONE IS JUST A COPY
     69          . I J=3 D  ; FIRST ONE IS JUST A COPY
    6770          . . ; W "FIRST ONE",!
    6871          . . D CP^GPLXPATH(MEDARYTMP,MEDOUTXML)
    69           . I J>1 D  ; AFTER THE FIRST, INSERT INNER XML
     72          . I J>3 D  ; AFTER THE FIRST, INSERT INNER XML
    7073          . . D INSINNER^GPLXPATH(MEDOUTXML,MEDARYTMP)
    71           N MEDTMP,I
     74          . S J=J+1
     75          N MEDTMP,MEDI
    7276          D MISSING^GPLXPATH(MEDOUTXML,"MEDTMP") ; SEARCH XML FOR MISSING VARS
    7377          I MEDTMP(0)>0 D  ; IF THERE ARE MISSING VARS - MARKED AS @@X@@
    7478          . W "MEDICATION MISSING ",!
    75           . F I=1:1:MEDTMP(0) W MEDTMP(I),!
     79          . F MEDI=1:1:MEDTMP(0) W MEDTMP(MEDI),!
    7680          Q
    7781          ;
Note: See TracChangeset for help on using the changeset viewer.