source: WorldVistAEHR/trunk/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/ORY243A.m@ 1375

Last change on this file since 1375 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 1.7 KB
Line 
1ORY243A ;SLCOIFO - Pre and Post-init for patch OR*3*243 ;4/25/07 14:12
2 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**243**;Dec 17, 1997;Build 242
3 ;
4INPQCONV ;
5 N DA,DIE,DR,INPDG,TEXT,TYPE,UDDG,X0
6 S TEXT(1)="Converting Inpatient Medications Quick Orders to"
7 S TEXT(2)="Unit Dose Medications Quick Orders."
8 D MES^XPDUTL(.TEXT)
9 S UDDG=$O(^ORD(100.98,"B","UNIT DOSE MEDICATIONS","")) Q:UDDG'>0
10 S INPDG=$O(^ORD(100.98,"B","INPATIENT MEDICATIONS","")) Q:INPDG'>0
11 S DIE="^ORD(101.41,"
12 S DA=0 F S DA=$O(^ORD(101.41,DA)) Q:DA'>0 D
13 . S X0=$G(^ORD(101.41,DA,0))
14 .I $P(X0,U,4)="Q",$P(X0,U,5)=INPDG D
15 ..S DR="5///^S X=UDDG" D ^DIE
16 Q
17 ;
18IVORCON ;
19 N ZTDESC,ZTDTH,ZTRTN,ZTSAVE,ZTIO,TEXT,ZTSK
20 S ZTDESC="Delayed IV Order conversion"
21 S TEXT=ZTDESC_" has been queued, task number "
22 S ZTRTN="IVORCONQ^ORY243A"
23 S ZTIO=""
24 S ZTDTH=$$NOW^XLFDT
25 D ^%ZTLOAD
26 I $D(ZTSK) S TEXT=TEXT_ZTSK D MES^XPDUTL(.TEXT)
27 Q
28 ;
29IVORCONQ ;
30 ;This code convert pre CPRS 27 delayed IV orders to a new order.
31 N DELSTAT,EVNT,FDA,MSG,IVDIAL,NODE,PAT,ORIEN
32 S IVDIAL=$O(^ORD(101.41,"B","PSJI OR PAT FLUID OE","")) Q:IVDIAL'>0
33 S DELSTAT=$O(^ORD(100.01,"B","DELAYED","")) Q:DELSTAT'>0
34 S PAT="" F S PAT=$O(^OR(100,"AEVNT",PAT)) Q:PAT="" D
35 .S EVNT="" F S EVNT=$O(^OR(100,"AEVNT",PAT,EVNT)) Q:EVNT="" D
36 ..S ORIEN="" F S ORIEN=$O(^OR(100,"AEVNT",PAT,EVNT,ORIEN)) Q:ORIEN="" D
37 ...S NODE=$G(^OR(100,ORIEN,0))
38 ...I +$P(NODE,U,5)'=IVDIAL Q
39 ...I $P($G(^OR(100,ORIEN,3)),U,3)'=DELSTAT Q
40 ...I $D(^OR(100,ORIEN,4.5,"ID","TYPE"))>0 Q
41 ...S FDA(100.045,"+2,"_ORIEN_",",.01)=20
42 ...S FDA(100.045,"+2,"_ORIEN_",",.02)="OR GTX IV TYPE"
43 ...S FDA(100.045,"+2,"_ORIEN_",",.03)=1
44 ...S FDA(100.045,"+2,"_ORIEN_",",.04)="TYPE"
45 ...S FDA(100.045,"+2,"_ORIEN_",",1)="C"
46 ...D UPDATE^DIE("E","FDA","","MSG")
47 Q
48 ;
Note: See TracBrowser for help on using the repository browser.