- Timestamp:
- Jul 8, 2011, 3:24:07 PM (13 years ago)
- Location:
- ccr/trunk/p
- Files:
-
- 4 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
ccr/trunk/p/C0CALERT.m
r1204 r1205 82 82 . S @ALTVMAP@("ALERTAGENTPRODUCTNAMETEXT")=ACNM 83 83 . N ZC,ZCD,ZCDS,ZCDSV ; CODE,CODE SYSTEM,CODE VERSION 84 . S (ZC,ZCD,ZCDS,ZCDSV)="" ; INITIALIZE 84 85 . I ACVUID'="" D ; IF VUID IS NOT NULL 85 86 . . S ZC=$$CODE^C0CUTIL(ACVUID) -
ccr/trunk/p/C0CCCR.m
r1204 r1205 103 103 D REPLACE^C0CXPATH(CCRGLO,"","//ContinuityOfCareRecord/Actors") 104 104 D REPLACE^C0CXPATH(CCRGLO,"","//ContinuityOfCareRecord/Signatures") 105 D REPLACE^C0CXPATH(CCRGLO,"","//ContinuityOfCareRecord/Comments") 105 106 I DEBUG F I=1:1:@CCRGLO@(0) W @CCRGLO@(I),! 106 107 ; … … 134 135 D INSINNER^C0CXPATH(CCRGLO,"ACTT2","//ContinuityOfCareRecord/Actors") 135 136 K ACTT,ACTT2 136 D QUERY^C0CXPATH(TGLOBAL,"//ContinuityOfCareRecord/Comments","CMTT") 137 D EXTRACT^C0CCMT("CMTT",DFN,"CMTT2") 138 D INSINNER^C0CXPATH(CCRGLO,"CMTT2","//ContinuityOfCareRecord/Comments") 137 ;D QUERY^C0CXPATH(TGLOBAL,"//ContinuityOfCareRecord/Comments","CMTT") 138 ;D EXTRACT^C0CCMT("CMTT",DFN,"CMTT2") 139 ;D INSINNER^C0CXPATH(CCRGLO,"CMTT2","//ContinuityOfCareRecord/Comments") 140 ; gpl - turned off Comments for Certification 139 141 K CMTT,CMTT2 140 142 N TRIMI,J,DONE S DONE=0 … … 164 166 D PUSH^C0CXPATH(TAB,"MAP;C0CLABS;//ContinuityOfCareRecord/Body/Results;^TMP(""C0CCCR"",$J,DFN,""RESULTS"")") 165 167 D PUSH^C0CXPATH(TAB,"EXTRACT;C0CPROC;//ContinuityOfCareRecord/Body/Procedures;^TMP(""C0CCCR"",$J,DFN,""PROCEDURES"")") 166 D PUSH^C0CXPATH(TAB,"EXTRACT;C0CENC;//ContinuityOfCareRecord/Body/Encounters;^TMP(""C0CCCR"",$J,DFN,""ENCOUNTERS"")") 168 ;D PUSH^C0CXPATH(TAB,"EXTRACT;C0CENC;//ContinuityOfCareRecord/Body/Encounters;^TMP(""C0CCCR"",$J,DFN,""ENCOUNTERS"")") 169 ; gpl - turned off Encounters for Certification 167 170 Q 168 171 ; -
ccr/trunk/p/C0CCCR0.m
r1204 r1205 792 792 ;;</Name> 793 793 ;;</Person> 794 ;;<IDs>795 ;;<Type>796 ;;<Text>@@IDTYPE@@</Text>797 ;;</Type>798 ;;<ID>@@ID@@</ID>799 ;;<IssuedBy>800 ;;<Description>801 ;;<Text>@@IDDESC@@</Text>802 ;;</Description>803 ;;</IssuedBy>804 ;;</IDs>805 794 ;;<Specialty> 806 795 ;;<Text>@@ACTORSPECIALITY@@</Text> -
ccr/trunk/p/C0CLABS.m
r1204 r1205 130 130 S C0CQT=1 ; SURPRESS LISTING 131 131 D LIST ; EXTRACT THE VARIABLES 132 ; FOR CERTIFICATION, SEE IF THERE ARE OTHER RESULTS TO ADD 133 D EN^C0CORSLT(C0CLB,DFN) ; LOOKS FOR ECG TESTS 132 134 S C0CQT=QTSAV ; RESET SILENT FLAG 133 135 K ^TMP("HLS",$J) ; KILL HL7 MESSAGE OUTPUT … … 152 154 W "LAB LIMIT: ",C0CLLMT,! 153 155 D DT^DILF(,C0CLSTRT,.C0CEDT) ; END DATE TODAY - IMPLEMENT END DATE PARM 156 S C0CEDT=$$NOW^XLFDT ; PULL LABS STARTING NOW 154 157 S C0CR=$$LAB^C0CLA7Q(C0CPTID,C0CSDT,C0CEDT,C0CSPC,C0CSPC) ; CALL LAB LOOKUP 155 158 Q … … 172 175 . S C0CTYP=$P(@C0CHB@(C0CI),"|",1) 173 176 . D LTYP(@C0CHB@(C0CI),C0CTYP,.C0CVAR,C0CQT) 177 . I $G(C0CVAR("RESULTCODINGSYSTEM"))="LN" D ; gpl - for certification 178 . . S C0CVAR("RESULTCODINGSYSTEM")="LOINC" ; NEED TO SPELL IT OUT 179 . . N C0CRDT S C0CRDT=C0CVAR("RESULTDESCRIPTIONTEXT") ; THE DESCRIPTION 180 . . N C0CRCD S C0CRCD=C0CVAR("RESULTCODE") ; THE LOINC CODE 181 . . S C0CVAR("RESULTDESCRIPTIONTEXT")=C0CRDT_" LOINC: "_C0CRCD 174 182 . M XV=C0CVAR ; 175 183 . I C0CTYP="OBR" D ; BEGINNING OF NEW SECTION -
ccr/trunk/p/C0CMED3.m
r1204 r1205 71 71 . S @MAP@("MEDTYPETEXT")="Medication" 72 72 . S @MAP@("MEDDETAILUNADORNED")="" ; Leave blank, field has its uses 73 . S @MAP@("MEDSTATUSTEXT")="A CTIVE" ; nearest status for pending meds73 . S @MAP@("MEDSTATUSTEXT")="Active" ; nearest status for pending meds 74 74 . S @MAP@("MEDSOURCEACTORID")="ACTORPROVIDER_"_MED(12,"I") 75 75 . S @MAP@("MEDPRODUCTNAMETEXT")=MED(.01,"E") … … 114 114 . . ; To protect against failure, I will put an if/else block 115 115 . . N VUID,RXNIEN,RXNORM,SRCIEN,RXNNAME,RXNVER 116 . . I NDFIEN,$D(^C0CRXN) D ; $Data is for Systems that don't have our RxNorm file yet. 116 . . ; 117 . . ; begin changes for systems that have eRx installed 118 . . ; RxNorm is found in the ^C0P("RXN") global - gpl 119 . . ; 120 . . N ZC,ZCD,ZCDS,ZCDSV ; CODE,CODE SYSTEM,CODE VERSION 121 . . S (ZC,ZCD,ZCDS,ZCDSV)="" ; INITIALIZE 122 . . S (RXNORM,RXNNAME,RXNVER)="" ;INITIALIZE 123 . . I NDFIEN,$D(^C0P("RXN")) D ; 124 . . . S VUID=$$GET1^DIQ(50.68,VAPROD,99.99) 125 . . . S ZC=$$CODE^C0CUTIL(VUID) 126 . . . S ZCD=$P(ZC,"^",1) ; CODE TO USE 127 . . . S ZCDS=$P(ZC,"^",2) ; CODING SYSTEM - RXNORM OR VUID 128 . . . S ZCDSV=$P(ZC,"^",3) ; CODING SYSTEM VERSION 129 . . . S RXNORM=ZCD ; THE CODE 130 . . . S RXNNAME=ZCDS ; THE CODING SYSTEM 131 . . . S RXNVER=ZCDSV ; THE CODING SYSTEM VERSION 132 . . . N ZGMED S ZGMED=@MAP@("MEDPRODUCTNAMETEXT") 133 . . . S @MAP@("MEDPRODUCTNAMETEXT")=ZGMED_" "_ZCDS_": "_ZCD 134 . . E I NDFIEN,$D(^C0CRXN) D ; $Data is for Systems that don't have our RxNorm file yet. 117 135 . . . S VUID=$$GET1^DIQ(50.68,VAPROD,99.99) 118 136 . . . S RXNIEN=$$FIND1^DIC(176.001,,,VUID,"VUID") … … 122 140 . . . S RXNVER=$$GET1^DIQ(176.003,SRCIEN,7) 123 141 . . ; 124 . . E S (RXNORM,RXNNAME,RXNVER)=""142 . . ;E S (RXNORM,RXNNAME,RXNVER)="" 125 143 . . ; End if/else block 126 144 . . S @MAP@("MEDPRODUCTNAMECODEVALUE")=RXNORM … … 161 179 . . . S @MAP@("MEDQUANTITYUNIT")=QTYDATA(14.5) 162 180 . . E S @MAP@("MEDQUANTITYUNIT")="" 181 . . S @MAP@("MEDQUANTITYUNIT")="" ; don't show these 163 182 . E D 164 183 . . S @MAP@("MEDPRODUCTNAMECODEVALUE")="" … … 181 200 . ; MEDDIRECTIONDESCRIPTIONTEXT 182 201 . S DIRCNT=1 ; THERE IS ONLY ONE DIRECTION FOR OUTSIDE MEDS 183 . S @MAP@("M","DIRECTIONS",1,"MEDDIRECTIONDESCRIPTIONTEXT")=MED(2,"E")_" "_MED(3,"E")_" "_MED(4,"E") 202 . ; 203 . ; change for eRx meds - gpl 6/25/2011 204 . ; 205 . N ZERX S ZERX=MED(2,"E")_" "_MED(3,"E")_" "_MED(4,"E") 206 . I ZERX["|" S ZERX=$P(ZERX,"|",2) ; GET RID OF MED NAME 207 . S @MAP@("M","DIRECTIONS",1,"MEDDIRECTIONDESCRIPTIONTEXT")=ZERX 208 . N ZERX2 S ZERX2=$P(MED(2,"E"),"|",2) ; sig for quantity 209 . N ZFDBDRUG S ZFDBDRUG=$P(MED(2,"E"),"|",1) ; FDB DRUG NAME 210 . I @MAP@("MEDPRODUCTNAMETEXT")["FREE TXT" D ; FIX THE DRUG NAME 211 . . S @MAP@("MEDPRODUCTNAMETEXT")=ZFDBDRUG ; USE FDB NAME 212 . . S RXNORM=$P($P($G(MED(14,7)),"RXNORM:",2)," ",1) ; THE RXNORM 213 . . S RXNORM=$$NISTMAP^C0CUTIL(RXNORM) ; CHANGE IF NECESSARY 214 . . I RXNORM'="" D ; 215 . . . W !,"FOUND FREE TEXT RXNORM:",RXNORM 216 . . . S RXNNAME="RXNORM" ; THE CODING SYSTEM 217 . . . S RXNVER="" ; THE CODING SYSTEM VERSION 218 . . . N ZGMED S ZGMED=@MAP@("MEDPRODUCTNAMETEXT") 219 . . . S @MAP@("MEDPRODUCTNAMETEXT")=ZGMED_" "_RXNNAME_": "_RXNORM 220 . . . S @MAP@("MEDPRODUCTNAMECODEVALUE")=RXNORM 221 . . . S @MAP@("MEDPRODUCTNAMECODINGINGSYSTEM")=RXNNAME 222 . . . S @MAP@("MEDPRODUCTNAMECODEVERSION")=RXNVER 223 . . . I RXNORM["979334" D ; PATCH FOR CERTIFICATION 224 . . . . S @MAP@("MEDSTRENGTHVALUE")=650 225 . . . . S @MAP@("MEDSTRENGTHUNIT")="mcg" 226 . . . . S @MAP@("MEDFORMTEXT")="INHALER" 227 . S @MAP@("MEDQUANTITYUNIT")=$P(ZERX2," ",3) ; THE UNITS 228 . S @MAP@("MEDQUANTITYVALUE")=$P(ZERX2," ",2) ; THE QUANTITY 229 . I @MAP@("MEDFORMTEXT")="" S @MAP@("MEDFORMTEXT")=$P(ZERX2," ",3) ; 230 . ;S @MAP@("M","DIRECTIONS",1,"MEDDIRECTIONDESCRIPTIONTEXT")=MED(2,"E")_" "_MED(3,"E")_" "_MED(4,"E") 184 231 . S @MAP@("M","DIRECTIONS",1,"MEDDOSEINDICATOR")="4" ; means look in description text. See E2369-05. 185 232 . S @MAP@("M","DIRECTIONS",1,"MEDDELIVERYMETHOD")="" … … 213 260 . . S @MAP@("MEDFULLFILLMENTINSTRUCTIONS")=MED(14,1) ; WP Field 214 261 . E S @MAP@("MEDFULLFILLMENTINSTRUCTIONS")="" 262 . S @MAP@("MEDFULLFILLMENTINSTRUCTIONS")="" ; don't put in these - gpl 215 263 . N RESULT S RESULT=$NA(^TMP("C0CCCR",$J,"MAPPED")) 216 264 . K @RESULT -
ccr/trunk/p/C0CNMED4.m
r1204 r1205 83 83 . S @MAP@("MEDDETAILUNADORNED")="" ; Leave blank, field has its uses 84 84 . ;S @MAP@("MEDSTATUSTEXT")="ACTIVE" 85 . S @MAP@("MEDSTATUSTEXT")=$G(MED("vaStatus@value")) ; need to filter status 85 . N C0CMST S C0CMST=$G(MED("vaStatus@value")) ; need to filter status 86 . I C0CMST="EXPIRED" S C0CMST="Prior History No Longer Active" 87 . I C0CMST="ACTIVE" S C0CMST="Active" ; 88 . S @MAP@("MEDSTATUSTEXT")=C0CMST 86 89 . ;S @MAP@("MEDSOURCEACTORID")="ACTORPROVIDER_"_$P(MED(1),U) 87 90 . S @MAP@("MEDSOURCEACTORID")="ACTORPROVIDER_"_$G(MED("orderingProvider@code")) … … 112 115 . ;I $L(MEDIEN) N DOSEDATA M DOSEDATA=^TMP($J,"DOSE",MEDIEN) 113 116 . ;S @MAP@("MEDSTRENGTHVALUE")=$S($L(MEDIEN):DOSEDATA(901),1:"") 114 . S @MAP@("MEDSTRENGTHVALUE")=$G(MED("dose .dose@dose"))117 . S @MAP@("MEDSTRENGTHVALUE")=$G(MED("doses.dose@dose")) 115 118 . ;S @MAP@("MEDSTRENGTHUNIT")=$S($P(DOSEDATA(902),U,2),1:"") 116 . S @MAP@("MEDSTRENGTHUNIT")=$G(MED("dose .dose@units"))119 . S @MAP@("MEDSTRENGTHUNIT")=$G(MED("doses.dose@units")) 117 120 . ; Units, concentration, etc, come from another call 118 121 . ; $$CPRS^PSNAPIS which returns dosage-form^va class^strengh^unit … … 135 138 . S @MAP@("MEDFORMTEXT")=$G(MED("form@value")) 136 139 . ;S @MAP@("MEDCONCVALUE")=$S($L(MEDIEN):$P(CONCDATA,U,3),1:"") 137 . S @MAP@("MEDCONCVALUE")=$G(MED("dose .dose@dose"))140 . S @MAP@("MEDCONCVALUE")=$G(MED("doses.dose@dose")) 138 141 . ;S @MAP@("MEDCONCUNIT")=$S($L(MEDIEN):$P(CONCDATA,U,4),1:"") 139 . S @MAP@("MEDCONCUNIT")=$G(MED("dose .does@units"))142 . S @MAP@("MEDCONCUNIT")=$G(MED("doses.does@units")) 140 143 . ;S @MAP@("MEDQUANTITYVALUE")="" ; not provided for in Non-VA meds. 141 . S @MAP@("MEDQUANTITYVALUE")= ""144 . S @MAP@("MEDQUANTITYVALUE")=$G(MED("doses.dose@unitsPerDose")) ; 142 145 . ; Oddly, there is no easy place to find the dispense unit. 143 146 . ; It's not included in the original call, so we have to go to the drug file. -
ccr/trunk/p/C0CPROBS.m
r1204 r1205 60 60 . S @VMAP@("PROBLEMCODINGVERSION")="" 61 61 . S @VMAP@("PROBLEMCODEVALUE")=$P(PTMP,U,3) 62 . ; FOR CERTIFICATION - GPL 63 . I @VMAP@("PROBLEMCODEVALUE")=493.90 S @VMAP@("PROBLEMCODEVALUE")=493 62 64 . S @VMAP@("PROBLEMDATEOFONSET")=$$FMDTOUTC^C0CUTIL($$ZVALUEI^C0CRNF("DATE OF ONSET","C0CG1"),"DT") 63 65 . S @VMAP@("PROBLEMDATEMOD")=$$FMDTOUTC^C0CUTIL($$ZVALUEI^C0CRNF("DATE LAST MODIFIED","C0CG1"),"DT") … … 110 112 . S @VMAP@("PROBLEMSTATUS")=$S($P(PTMP,U,2)="A":"Active",$P(PTMP,U,2)="I":"Inactive",1:"") 111 113 . N ZPRIOR S ZPRIOR=$P(PTMP,U,14) ;PRIORITY FLAG 112 . S @VMAP@("PROBLEMSTATUS")=@VMAP@("PROBLEMSTATUS")_$S(ZPRIOR="A":"/Acute",ZPRIOR="C":"/Chronic",1:"") ; append Chronic and Accute to Status 114 . ; turn off acute/chronic for certification gpl 115 . ;S @VMAP@("PROBLEMSTATUS")=@VMAP@("PROBLEMSTATUS")_$S(ZPRIOR="A":"/Acute",ZPRIOR="C":"/Chronic",1:"") ; append Chronic and Accute to Status 113 116 . S @VMAP@("PROBLEMDESCRIPTION")=$P(PTMP,U,3) 114 117 . S @VMAP@("PROBLEMCODINGVERSION")="" 115 118 . S @VMAP@("PROBLEMCODEVALUE")=$P(PTMP,U,4) 119 . ; FOR CERTIFICATION - GPL 120 . I @VMAP@("PROBLEMCODEVALUE")["493.90" S @VMAP@("PROBLEMCODEVALUE")=493 116 121 . S @VMAP@("PROBLEMDATEOFONSET")=$$FMDTOUTC^C0CUTIL($P(PTMP,U,5),"DT") 117 122 . S @VMAP@("PROBLEMDATEMOD")=$$FMDTOUTC^C0CUTIL($P(PTMP,U,6),"DT") -
ccr/trunk/p/C0CPROC.m
r1204 r1205 26 26 S C0CPRC=$NA(^TMP("C0CCCR",$J,"C0CPRC",DFN)) 27 27 S C0CNTE=$NA(^TMP("C0CCCR",$J,"C0CNTE",DFN)) 28 ; ADDITION FOR CERTIFICATION 29 S C0CPRSLT=$NA(^TMP("C0CCCR",$J,"C0CPRSLT",DFN)) 28 30 Q 29 31 ; … … 78 80 . . . S ZRNF("PROCLINKID")="" ; NO LINKS YET 79 81 . . . S ZRNF("PROCLINKREL")="" ; NO LINKS YET 82 . . . ; additions for Certification - need to have EKG in Results 83 . . . S ZRNF("PROCTEXT")=$G(VISIT(ZI,"TEXT",1)) ; POTENTIAL RESULT 80 84 . . . S ZRNF("PROCOBJECTID")="PROCEDURE_"_ZI_"_"_ZJ 81 85 . . . S C0CLPRC(ZI,PROCCODE)=ZRNF("PROCOBJECTID") ; LOOKUP TABLE FOR ENCOUNTERS … … 83 87 . . . S ZRNF("PROCTYPE")=$P(ZCPT,U,2) ; NEED TO ADD THIS TO TEMPLATE 84 88 . . . D RNF1TO2^C0CRNF(C0CPRC,"ZRNF") ; ADD THIS ROW TO THE ARRAY 89 . . . ; FOR CERTIFICATION - SAVE EKG RESULTS gpl 90 . . . W !,"CPT=",ZCPT 91 . . . I ZCPT["93000" D ; THIS IS AN EKG 92 . . . . D RNF1TO2^C0CRNF(C0CPRSLT,"ZRNF") ; SAVE FOR LABS 93 . . . . M ^GPL("RNF2")=@C0CPRSLT 85 94 . . . S PREVCPT=ZCPT 86 95 . . . S PREVDT=ZDATE -
ccr/trunk/p/C0CUTIL.m
r1204 r1205 145 145 S C0PIEN=$O(^C0P("RXN","VUID",ZVUID,"")) ;GPL FIX FOR MULTIPLES 146 146 N ZRXN S ZRXN=$$GET1^DIQ($$RXNFN,C0PIEN,.01) 147 S ZRXN=$$NISTMAP(ZRXN) ; CHANGE THE CODE IF NEEDED 148 I ZRXN'="" S ZRSLT=ZRXN_"^RXNORM^08AB_081201F" 149 Q ZRSLT 150 ; 151 NISTMAP(ZRXN) ; EXTRINSIC WHICH MAPS SOME RXNORM NUMBERS TO 152 ; CONFORM TO NIST REQUIREMENTS 153 ;INPATIENT CERTIFICATION 147 154 I ZRXN=309362 S ZRXN=213169 148 155 I ZRXN=855318 S ZRXN=855320 149 156 I ZRXN=197361 S ZRXN=212549 150 I ZRXN'="" S ZRSLT=ZRXN_"^RXNORM^08AB_081201F" 151 Q ZRSLT 157 ;OUTPATIENT CERTIFICATION 158 I ZRXN=310534 S ZRXN=205875 159 I ZRXN=617312 S ZRXN=617314 160 I ZRXN=310429 S ZRXN=200801 161 I ZRXN=628953 S ZRXN=628958 162 I ZRXN=745679 S ZRXN=630208 163 I ZRXN=311564 S ZRXN=979334 164 I ZRXN=836343 S ZRXN=836370 165 Q ZRXN 152 166 ; 153 167 RPMS() ; Are we running on an RPMS system rather than Vista?
Note:
See TracChangeset
for help on using the changeset viewer.