- Timestamp:
- Jul 30, 2008, 10:00:08 AM (16 years ago)
- Location:
- ccr/trunk/p
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
ccr/trunk/p/GPLCCR.m
r77 r79 31 31 S ODIRGLB=$NA(^TMP("GPLCCR","ODIR")) 32 32 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/" 35 35 . ;S @ODIRGLB="/opt/wv/p/" 36 36 S ODIR=@ODIRGLB … … 72 72 S CCRXTAB=$NA(^TMP("GPLCCR",$J,"CCRSTEP")) ; GLOBAL TO STORE CCR STEPS 73 73 D INITSTPS(CCRXTAB) ; INITIALIZED CCR PROCESSING STEPS 74 N I,XI,TAG,RTN,CALL,XPATH,IXML,OXML,INXML,CCRBLD75 F I=1:1:@CCRXTAB@(0) D ; PROCESS THE CCR BODY SECTIONS76 . S XI=@CCRXTAB@( I) ; CALL COPONENTS TO PARSE74 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 77 77 . S RTN=$P(XI,";",2) ; NAME OF ROUTINE TO CALL 78 78 . S TAG=$P(XI,";",1) ; LABEL INSIDE ROUTINE TO CALL … … 92 92 D EXTRACT^GPLACTORS("ACTT",ACTGLO,"ACTT2") 93 93 D INSINNER^GPLXPATH(CCRGLO,"ACTT2","//ContinuityOfCareRecord/Actors") 94 N I,J,DONE S DONE=095 F I=0:0 D Q:DONE ; DELETE UNTIL ALL EMPTY ELEMENTS ARE GONE94 N TRIMI,J,DONE S DONE=0 95 F TRIMI=0:0 D Q:DONE ; DELETE UNTIL ALL EMPTY ELEMENTS ARE GONE 96 96 . S J=$$TRIM^GPLXPATH(CCRGLO) ; DELETE EMPTY ELEMENTS 97 97 . W "TRIMMED",J,! … … 104 104 ; ORDER FOR CCR IS PROBLEMS,FAMILYHISTORY,SOCIALHISTORY,MEDICATIONS,VITALSIGNS,RESULTS,HEALTHCAREPROVIDERS 105 105 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"")") 107 107 D PUSH^GPLXPATH(TAB,"EXTRACT;GPLVITALS;//ContinuityOfCareRecord/Body/VitalSigns;^TMP(""GPLCCR"",$J,DFN,""VITALS"")") 108 108 I TESTLAB D PUSH^GPLXPATH(TAB,"EXTRACT;GPLLABS;//ContinuityOfCareRecord/Body/Results;^TMP(""GPLCCR"",$J,DFN,""RESULTS"")") -
ccr/trunk/p/GPLCCR0.m
r78 r79 284 284 ;;<Text>@@MEDICATIONTYPETEXT@@</Text> 285 285 ;;</Type> 286 ;;<Description> 287 ;;<Text>@@MEDICATIONDESCRIPTIONTEXT@@</Text> 288 ;;</Description> 286 289 ;;<Status> 287 290 ;;<Text>@@MEDICATIONSTATUSTEXT@@</Text> -
ccr/trunk/p/GPLMEDS.m
r73 r79 28 28 N MEDRSLT,J,K,MEDPTMP,X,MEDVMAP,TBUF 29 29 D ACTIVE^ORWPS(.MEDRSLT,DFN) 30 Q30 ZWR MEDRSLT 31 31 I '$D(MEDRSLT(1)) W "ERROR RUNNINIG MEDICATIONS RPC",! Q 32 32 S MEDTVMAP=$NA(^TMP("GPLCCR",$J,"MEDICATIONS")) 33 33 S MEDTARYTMP=$NA(^TMP("GPLCCR",$J,"MEDARYTMP")) 34 34 F J=1:1 Q:'$D(MEDRSLT(J)) D ; FOR EACH MEDICATION IN THE LIST 35 . W "J IS",J,! 35 36 . S MEDVMAP=$NA(@MEDTVMAP@(J)) 36 37 . K @MEDVMAP … … 39 40 . S @MEDVMAP@("MEDICATIONOBJECTID")="MED"_J ; UNIQUE OBJID FOR MEDICATION 40 41 . ; 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")="" 63 66 . S MEDARYTMP=$NA(@MEDTARYTMP@(J)) 64 67 . K @MEDARYTMP 65 68 . D MAP^GPLXPATH(MEDXML,MEDVMAP,MEDARYTMP) 66 . I J= 1D ; FIRST ONE IS JUST A COPY69 . I J=3 D ; FIRST ONE IS JUST A COPY 67 70 . . ; W "FIRST ONE",! 68 71 . . D CP^GPLXPATH(MEDARYTMP,MEDOUTXML) 69 . I J> 1D ; AFTER THE FIRST, INSERT INNER XML72 . I J>3 D ; AFTER THE FIRST, INSERT INNER XML 70 73 . . D INSINNER^GPLXPATH(MEDOUTXML,MEDARYTMP) 71 N MEDTMP,I 74 . S J=J+1 75 N MEDTMP,MEDI 72 76 D MISSING^GPLXPATH(MEDOUTXML,"MEDTMP") ; SEARCH XML FOR MISSING VARS 73 77 I MEDTMP(0)>0 D ; IF THERE ARE MISSING VARS - MARKED AS @@X@@ 74 78 . W "MEDICATION MISSING ",! 75 . F I=1:1:MEDTMP(0) W MEDTMP(I),!79 . F MEDI=1:1:MEDTMP(0) W MEDTMP(MEDI),! 76 80 Q 77 81 ;
Note:
See TracChangeset
for help on using the changeset viewer.