VistA-FOIAVistA/r/ORDER_ENTRY_RESULTS_REPORTI.../ORB3C0.m

61 lines
2.8 KiB
Mathematica

ORB3C0 ; slc/CLA - Routine to stub in notifications for parameter conversion to CPRS ;3/23/97 21:22
;;3.0;ORDER ENTRY/RESULTS REPORTING;**9**;Dec 17, 1997
Q
STUB ;initiate stubbing of notifications 30-57 so pkg-level parameters will have something to point to:
D BMES^XPDUTL("Stubbing notifications 30-49,51-57.")
N ORBI,ORBNAM,ORBA,ORBIEN,ORBERR
S ORBA(100.9,"+30,",.01)="CONSULT/REQUEST CANCEL/HOLD",ORBIEN(30)=30
S ORBA(100.9,"+31,",.01)="NPO DIET MORE THAN 72 HRS",ORBIEN(31)=31
S ORBA(100.9,"+32,",.01)="SITE-FLAGGED RESULTS",ORBIEN(32)=32
S ORBA(100.9,"+33,",.01)="ORDERER-FLAGGED RESULTS",ORBIEN(33)=33
S ORBA(100.9,"+35,",.01)="DISCHARGE",ORBIEN(35)=35
S ORBA(100.9,"+36,",.01)="TRANSFER FROM PSYCHIATRY",ORBIEN(36)=36
S ORBA(100.9,"+37,",.01)="ORDER REQUIRES CO-SIGNATURE",ORBIEN(37)=37
S ORBA(100.9,"+41,",.01)="SITE-FLAGGED ORDER",ORBIEN(41)=41
S ORBA(100.9,"+42,",.01)="LAB ORDER CANCELED",ORBIEN(42)=42
S ORBA(100.9,"+43,",.01)="STAT ORDER",ORBIEN(43)=43
S ORBA(100.9,"+44,",.01)="STAT RESULTS",ORBIEN(44)=44
S ORBA(100.9,"+45,",.01)="DNR EXPIRING",ORBIEN(45)=45
S ORBA(100.9,"+46,",.01)="FREE TEXT",ORBIEN(46)=46
S ORBA(100.9,"+47,",.01)="MEDICATIONS EXPIRING",ORBIEN(47)=47
S ORBA(100.9,"+48,",.01)="UNVERIFIED MEDICATION ORDER",ORBIEN(48)=48
S ORBA(100.9,"+51,",.01)="STAT IMAGING REQUEST",ORBIEN(51)=51
S ORBA(100.9,"+52,",.01)="URGENT IMAGING REQUEST",ORBIEN(52)=52
S ORBA(100.9,"+53,",.01)="IMAGING RESULTS AMENDED",ORBIEN(53)=53
S ORBA(100.9,"+54,",.01)="ORDER CHECK",ORBIEN(54)=54
S ORBA(100.9,"+55,",.01)="FOOD/DRUG INTERACTION",ORBIEN(55)=55
S ORBA(100.9,"+56,",.01)="ERROR MESSAGE",ORBIEN(56)=56
S ORBA(100.9,"+57,",.01)="CRITICAL LAB RESULTS (ACTION)",ORBIEN(57)=57
S ORBA(100.9,"+58,",.01)="ABNORMAL LAB RESULT (INFO)",ORBIEN(58)=58
D CLEAN^DILF
D UPDATE^DIE("","ORBA","ORBIEN","ORBERR")
D BMES^XPDUTL("Notification stubbing completed.")
D BMES^XPDUTL("Updating notifications 14,21,22,24,25,26,50.")
S $P(^ORD(100.9,14,0),U)="ABNORMAL LAB RESULTS (ACTION)"
S $P(^ORD(100.9,21,0),U)="IMAGING PATIENT EXAMINED"
S $P(^ORD(100.9,22,0),U)="IMAGING RESULTS"
S $P(^ORD(100.9,24,0),U)="CRITICAL LAB RESULT (INFO)"
S $P(^ORD(100.9,25,0),U)="ABNORMAL IMAGING RESULTS"
S $P(^ORD(100.9,26,0),U)="IMAGING REQUEST CANCEL/HELD"
S $P(^ORD(100.9,50,0),U)="NEW ORDER"
;kill then rebuild "B" x-ref:
K ^ORD(100.9,"B")
S DIK="^ORD(100.9,",DIK(1)=".01^B" D ENALL^DIK
K DIK
D BMES^XPDUTL("Notification updating completed.")
Q
UNSTUB ;remove stubbed entries in Notifications file
N ORBI,ORBNAM
F ORBI=30:1:49 D
.Q:'$D(^ORD(100.9,ORBI))
.S ORBNAM=$P(^ORD(100.9,ORBI,0),U)
.W !,"Killing notif ",ORBI," [",ORBNAM,"]"
.S DA=ORBI,DIK="^ORD(100.9," D ^DIK K DA,DIK
F ORBI=51:1:58 D
.Q:'$D(^ORD(100.9,ORBI))
.S ORBNAM=$P(^ORD(100.9,ORBI,0),U)
.W !,"Killing notif ",ORBI," [",ORBNAM,"]"
.S DA=ORBI,DIK="^ORD(100.9," D ^DIK K DA,DIK
K DA,DIK
Q