Changeset 90
- Timestamp:
- Aug 17, 2008, 12:49:12 AM (16 years ago)
- Location:
- ccr/trunk/p
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
ccr/trunk/p/GPLCCR0.m
r79 r90 272 272 ;;<DateTime> 273 273 ;;<Type> 274 ;;<Text>@@MEDICATIONDATETIMETEXT@@</Text> 275 ;;</Type> 276 ;;<Age> 277 ;;<Value>@@MEDICATIONDATETIMEAGE@@</Value> 278 ;;<Units> 279 ;;<Unit>@@MEDICATIONDATETIMEAGEUNITS@@</Unit> 280 ;;</Units> 281 ;;</Age> 274 ;;<Text>@@MEDICATIONISSUEDATETXT@@</Text> 275 ;;</Type> 276 ;;<ExactDateTime>@@MEDICATIONISSUEDATE@@</ExactDateTime> 277 ;;<Type> 278 ;;<Text>@@MEDICATIONLASTFILLDATETXT@@</Text> 279 ;;</Type> 280 ;;<ExactDateTime>@@MEDICATIONLASTFILLDATE@@</ExactDateTime> 282 281 ;;</DateTime> 283 282 ;;<Type> 284 283 ;;<Text>@@MEDICATIONTYPETEXT@@</Text> 285 284 ;;</Type> 286 ;;<Description>287 ;;<Text>@@MEDICATIONDESCRIPTIONTEXT@@</Text>288 ;;</Description>289 285 ;;<Status> 290 286 ;;<Text>@@MEDICATIONSTATUSTEXT@@</Text> … … 306 302 ;;<BrandName> 307 303 ;;<Text>@@MEDICATIONBRANDNAMETEXT@@</Text> 308 ;;<Code>309 ;;<Value>@@MEDICATIONBRANDNAMECODEVALUE@@</Value>310 ;;<CodingSystem>@@MEDICATIONBRANDNAMECODINGSYSTEM@@</CodingSystem>311 ;;<Version>@@MEDICATIONBRANDNAMECODEVERSION@@</Version>312 ;;</Code>313 304 ;;</BrandName> 314 305 ;;<Strength> … … 321 312 ;;<Text>@@MEDICATIONFORMTEXT@@</Text> 322 313 ;;</Form> 314 ;;<Concentration> 315 ;;<Text>@@MEDICATIONCONCENTRATIONTEXT@@</Text> 316 ;;</Concentration> 317 ;;<Size> 318 ;;<Text>@@MEDICATIONSIZETEXT</Text> 319 ;;</Size> 323 320 ;;</Product> 321 ;;<Quantity> 322 ;;<Value>@@MEDICATIONQUANTITYVALUE@@</Value> 323 ;;<Units> 324 ;;<Unit>@@MEDICATIONQUANTITYUNIT@@</Unit> 325 ;;</Units> 324 326 ;;<Directions> 325 327 ;;<Direction> … … 327 329 ;;<Text>@@MEDICATIONDIRECTIONDESCRIPTIONTEXT@@</Text> 328 330 ;;</Description> 331 ;;<DoseIndicator>@@MEDICATIONDOSEINDICATOR@@</DoseIndicator> 332 ;;<DeliveryMethod>@@MEDICATIONDELIVERYMETHOD@@</DeliveryMethod> 329 333 ;;<Dose> 330 334 ;;<Value>@@MEDICATIONDIRECTIONDOSEVALUE@@</Value> 335 ;;<Units> 336 ;;<Unit>@@MEDICATIONDOSEUNIT@@</Unit> 337 ;;</Units> 338 ;;<Rate> 339 ;;<Value>@@MEDICATIONDIRECTIONRATEVALUE@@</Value> 340 ;;<Units> 341 ;;<Unit>@@MEDICATIONRATEUNIT@@</Unit> 342 ;;</Units> 343 ;;</Rate> 331 344 ;;</Dose> 345 ;;<Vehicle> 346 ;;<Text>@@MEDICATIONVEHICLETEXT@@</Text> 347 ;;</Vehicle> 332 348 ;;<Route> 333 349 ;;<Text>@@MEDICATIONDIRECTIONROUTETEXT@@</Text> 334 350 ;;</Route> 335 351 ;;<Frequency> 336 ;;<Value>@@MEDICATIONDIRECTIONFREQUENCYVALUE@@</Value> 352 ;;<Value>@@MEDICATIONFREQUENCYVALUE@@</Value> 353 ;;<Units> 354 ;;<Unit>@@MEDICATIONFREQUENCYUNIT@@</Unit> 355 ;;<Units> 337 356 ;;</Frequency> 357 ;;<Interval> 358 ;;<Value>@@MEDICATIONINTERVALVALUE@@</Value> 359 ;;<Units> 360 ;;<Unit>@@MEDICATIONINTERVALUNIT@@</Unit> 361 ;;<Units> 362 ;;</Interval> 363 ;;<Duration> 364 ;;<Value>@@MEDICATIONDURATIONVALUE@@</Value> 365 ;;<Units> 366 ;;<Unit>@@MEDICATIONDURATIONUNIT@@</Unit> 367 ;;</Duration> 338 368 ;;</Direction> 339 369 ;;</Directions> -
ccr/trunk/p/GPLMEDS.m
r86 r90 18 18 ;51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 19 ; 20 21 22 20 W "NO ENTRY FROM TOP",! 21 Q 22 ; 23 23 EXTRACT(MEDXML,DFN,MEDOUTXML) ; EXTRACT MEDICATIONS INTO PROVIDED XML TEMPLATE 24 24 ; … … 26 26 ; IMEDXML WILL CONTAIN ONLY THE MEDICATIONS SECTION OF THE OVERALL TEMPLATE 27 27 ; 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 28 N MEDRSLT,I,J,K,MEDPTMP,X,MEDVMAP,TBUF 29 D ACTIVE^ORWPS(.MEDRSLT,DFN) 30 I '$D(MEDRSLT(1)) D ; NO MEDS FOR THIS PATIENT, EXIT 31 . W "ERROR RUNNINIG MEDICATIONS RPC",! 32 . S @MEDOUTXML@(0)=0 33 . Q 34 IF DEBUG ZWR MEDRSLT 35 S MEDTVMAP=$NA(^TMP("GPLCCR",$J,"MEDICATIONS")) 36 S MEDTARYTMP=$NA(^TMP("GPLCCR",$J,"MEDARYTMP")) 37 F J=1:3 Q:'$D(MEDRSLT(J)) D ; FOR EACH MEDICATION IN THE LIST 38 . W "J IS ",J,! 39 . S MEDVMAP=$NA(@MEDTVMAP@(J)) 40 . K @MEDVMAP 41 . I DEBUG W "VMAP= ",VMAP,! 42 . S MEDPTMP=MEDRSLT(J) ; PULL OUT MEDICATION FROM RPC RETURN ARRAY 43 . S @MEDVMAP@("MEDICATIONOBJECTID")="MED"_J ; UNIQUE OBJID FOR MEDS 44 . ; PROCESSING FOR MEDS GOES HERE 45 . S @MEDVMAP@("MEDICATIONDATETIMETEXT")=$$FMDTOUTC^CCRUTIL($P(MEDPTMP,"^",11),"DT") ; GETS LAST FILL DATE 46 . S @MEDVMAP@("MEDICATIONDATETIMEAGE")="" 47 . S @MEDVMAP@("MEDICATIONDATETIMEAGEUNITS")="" 48 . S @MEDVMAP@("MEDICATIONTYPETEXT")="Medication" 49 . S @MEDVMAP@("MEDICATIONSTATUSTEXT")=$P(MEDPTMP,"^",10) ; STATUS FROM RPC 50 . S @MEDVMAP@("MEDICATIONSOURCEACTORID")="ACTORSYSTEM_1" 51 . S @MEDVMAP@("MEDICATIONPRODUCTNAMETEXT")=$P(MEDPTMP,"^",3) 52 . S @MEDVMAP@("MEDICATIONPRODUCTNAMECODEVALUE")="" 53 . S @MEDVMAP@("MEDICATIONPRODUCTNAMECODINGINGSYSTEM")="" 54 . S @MEDVMAP@("MEDICATIONPRODUCTNAMECODEVERSION")="" 55 . S @MEDVMAP@("MEDICATIONBRANDNAMETEXT")="" 56 . S @MEDVMAP@("MEDICATIONBRANDNAMECODEVALUE")="" 57 . S @MEDVMAP@("MEDICATIONBRANDNAMECODINGSYSTEM")="" 58 . S @MEDVMAP@("MEDICATIONBRANDNAMECODEVERSION")="" 59 . S @MEDVMAP@("MEDICATIONSTRENGTHVALUE")="" 60 . S @MEDVMAP@("MEDICATIONSTRENGTHUNIT")="" 61 . S @MEDVMAP@("MEDICATIONFORMTEXT")="" 62 . S @MEDVMAP@("MEDICATIONDESCRIPTIONTEXT")=$P(MEDRSLT(J+1)," *",2) 63 . S @MEDVMAP@("MEDICATIONDIRECTIONDESCRIPTIONTEXT")=$P(MEDRSLT(J+2),"\ Sig: ",2) 64 . S @MEDVMAP@("MEDICATIONDIRECTIONDOSEVALUE")="" 65 . S @MEDVMAP@("MEDICATIONDIRECTIONROUTETEXT")="" 66 . S @MEDVMAP@("MEDICATIONDIRECTIONFREQUENCYVALUE")="" 67 . S MEDARYTMP=$NA(@MEDTARYTMP@(J)) 68 . K @MEDARYTMP 69 . D MAP^GPLXPATH(MEDXML,MEDVMAP,MEDARYTMP) 70 . I J=1 D ; FIRST ONE IS JUST A COPY 71 . . ; W "FIRST ONE",! 72 . . D CP^GPLXPATH(MEDARYTMP,MEDOUTXML) 73 . I J>1 D ; AFTER THE FIRST, INSERT INNER XML 74 . . D INSINNER^GPLXPATH(MEDOUTXML,MEDARYTMP) 75 N MEDTMP,MEDI 76 D MISSING^GPLXPATH(MEDOUTXML,"MEDTMP") ; SEARCH XML FOR MISSING VARS 77 I MEDTMP(0)>0 D ; IF THERE ARE MISSING VARS - MARKED AS @@X@@ 78 . W "MEDICATION MISSING ",! 79 . F MEDI=1:1:MEDTMP(0) W MEDTMP(MEDI),! 80 Q 81 ;
Note:
See TracChangeset
for help on using the changeset viewer.