Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: RAIPST6

RAIPST6.m

Go to the documentation of this file.
  1. RAIPST6 ;HIRMFO/GJC - Post-init number six ;11/23/97 13:25
  1. VERSION ;;5.0;Radiology/Nuclear Medicine;;Mar 16, 1998
  1. ;
  1. EN1 ; Add the following protocols to file 101 iff they are new
  1. ; to the Protocol (101) file: RA SEND ORM, RA SEND ORU, RA CANCEL
  1. ; & RA EVSEND OR. DBIA: 872
  1. ; Note: The third subscript of RAFDA is the field number in file 101.
  1. ; Consult a data dictionary for further information.
  1. SNDORM ; RA SEND ORM protocol
  1. I '$D(^ORD(101,"B","RA SEND ORM")) D
  1. . N RA101,RAFDA
  1. . S RAFDA(101,"+1,",.01)="RA SEND ORM"
  1. . S RAFDA(101,"+1,",1)="Client for Imaging (ORM)"
  1. . S RAFDA(101,"+1,",12)=$$PKG^RAIPST5()
  1. . S RAFDA(101,"+1,",4)="subscriber"
  1. . S RAFDA(101,"+1,",15)="Q"
  1. . S RAFDA(101,"+1,",99)=$$TSTMP^RAIPST5()
  1. . S RAFDA(101,"+1,",770.4)="O01"
  1. . S RAFDA(101,"+1,",773.1)="NO"
  1. . S RAFDA(101,"+1,",773.3)="NO"
  1. . S RAFDA(101,"+1,",20)="Q"
  1. . S RAFDA(101,"+1,",770.2)="RA-CLIENT-IMG"
  1. . S RAFDA(101,"+1,",770.6)=$$PROID^RAIPST5()
  1. . S RAFDA(101,"+1,",771)="Q"
  1. . S RAFDA(101,"+1,",773.2)="NO"
  1. . S RAFDA(101,"+1,",773.4)="YES"
  1. . D MSG^RAIPST5("RA SEND ORM")
  1. . D UPDATE^DIE("E","RAFDA")
  1. . I $D(^ORD(101,"B","RA SEND ORM")) D Q
  1. .. S RA101=$O(^ORD(101,"B","RA SEND ORM",0))
  1. .. K RAFDA S RAFDA(101,RA101_",",770.95)=2.1 D FILE^DIE("E","RAFDA")
  1. .. S ^ORD(101,RA101,1,1,0)="This protocol receives the HL7 message."
  1. .. S ^ORD(101,RA101,1,0)="^^1^1^"_$$DT^XLFDT()_"^^"
  1. .. Q
  1. . D ERR^RAIPST5("RA SEND ORM")
  1. . Q
  1. SNDORU ; RA SEND ORU protocol
  1. I '$D(^ORD(101,"B","RA SEND ORU")) D
  1. . N RA101,RAFDA
  1. . S RAFDA(101,"+1,",.01)="RA SEND ORU"
  1. . S RAFDA(101,"+1,",1)="Client for Imaging (ORU)"
  1. . S RAFDA(101,"+1,",12)=$$PKG^RAIPST5()
  1. . S RAFDA(101,"+1,",4)="subscriber"
  1. . S RAFDA(101,"+1,",15)="Q"
  1. . S RAFDA(101,"+1,",99)=$$TSTMP^RAIPST5()
  1. . S RAFDA(101,"+1,",770.4)="R01"
  1. . S RAFDA(101,"+1,",773.1)="NO"
  1. . S RAFDA(101,"+1,",773.3)="NO"
  1. . S RAFDA(101,"+1,",20)="Q"
  1. . S RAFDA(101,"+1,",770.2)="RA-CLIENT-IMG"
  1. . S RAFDA(101,"+1,",770.6)=$$PROID^RAIPST5()
  1. . S RAFDA(101,"+1,",771)="Q"
  1. . S RAFDA(101,"+1,",773.2)="NO"
  1. . S RAFDA(101,"+1,",773.4)="YES"
  1. . D MSG^RAIPST5("RA SEND ORU")
  1. . D UPDATE^DIE("E","RAFDA")
  1. . I $D(^ORD(101,"B","RA SEND ORU")) D Q
  1. .. S RA101=$O(^ORD(101,"B","RA SEND ORU",0))
  1. .. K RAFDA S RAFDA(101,RA101_",",770.95)=2.1 D FILE^DIE("E","RAFDA")
  1. .. S ^ORD(101,RA101,1,1,0)="This protocol receives the HL7 message."
  1. .. S ^ORD(101,RA101,1,0)="^^1^1^"_$$DT^XLFDT()_"^^"
  1. .. Q
  1. . D ERR^RAIPST5("RA SEND ORU")
  1. . Q
  1. CANCEL ; RA CANCEL protocol
  1. I '$D(^ORD(101,"B","RA CANCEL")) D
  1. . N RA101,RAFDA
  1. . S RAFDA(101,"+1,",.01)="RA CANCEL"
  1. . S RAFDA(101,"+1,",1)="Rad/Nuc Med exam cancellation"
  1. . S RAFDA(101,"+1,",12)=$$PKG^RAIPST5()
  1. . S RAFDA(101,"+1,",4)="event driver"
  1. . S RAFDA(101.01,"+2,+1,",.01)="RA SEND ORM"
  1. . S RAFDA(101,"+1,",20)="Q"
  1. . S RAFDA(101,"+1,",770.3)="ORM"
  1. . S RAFDA(101,"+1,",770.6)=$$PROID^RAIPST5()
  1. . S RAFDA(101,"+1,",772)="Q"
  1. . S RAFDA(101,"+1,",99)=$$TSTMP^RAIPST5()
  1. . S RAFDA(101,"+1,",770.4)="O01"
  1. . D MSG^RAIPST5("RA CANCEL")
  1. . D UPDATE^DIE("E","RAFDA")
  1. . I $D(^ORD(101,"B","RA CANCEL")) D Q
  1. .. S RA101=$O(^ORD(101,"B","RA CANCEL",0))
  1. .. K RAFDA S RAFDA(101,RA101_",",770.95)=2.1 D FILE^DIE("E","RAFDA")
  1. .. S ^ORD(101,RA101,1,1,0)="This protocol is triggered whenever a Radiology/Nuclear Medicine exam is"
  1. .. S ^ORD(101,RA101,1,2,0)="cancelled. It executes code that creates an HL7 ORM message consisting of"
  1. .. S ^ORD(101,RA101,1,3,0)="PID, ORC, OBR and OBX segments. The message contains all relevant"
  1. .. S ^ORD(101,RA101,1,4,0)="information about the exam, including procedure, time of cancellation,"
  1. .. S ^ORD(101,RA101,1,5,0)="procedure modifiers, patient allergies and clinical history."
  1. .. S ^ORD(101,RA101,1,0)="^^5^5^"_$$DT^XLFDT()_"^^"
  1. .. Q
  1. . D ERR^RAIPST5("RA CANCEL")
  1. . Q
  1. EVSEND ; RA EVSEND OR protocol
  1. I '$D(^ORD(101,"B","RA EVSEND OR")) D
  1. . N RA101,RAFDA
  1. . S RAFDA(101,"+1,",.01)="RA EVSEND OR"
  1. . S RAFDA(101,"+1,",1)="Rad/Nuc Med event sent to OE/RR"
  1. . S RAFDA(101,"+1,",12)=$$PKG^RAIPST5()
  1. . S RAFDA(101,"+1,",4)="extended action"
  1. . S RAFDA(101,"+1,",44)="RA EVSEND"
  1. . S RAFDA(101,"+1,",15)="K:$L($G(RAVARBLE)) @RAVARBLE,RAVARBLE"
  1. . S RAFDA(101,"+1,",99)=$$TSTMP^RAIPST5()
  1. . D MSG^RAIPST5("RA EVSEND OR")
  1. . D UPDATE^DIE("E","RAFDA")
  1. . I $D(^ORD(101,"B","RA EVSEND OR")) D Q
  1. .. S RA101=$O(^ORD(101,"B","RA EVSEND OR",0))
  1. .. S ^ORD(101,RA101,1,1,0)="Invoked when a request is created or changed by the Radiology/Nuclear"
  1. .. S ^ORD(101,RA101,1,2,0)="Medicine package (the ""backdoor"") and the data is passed to the Order"
  1. .. S ^ORD(101,RA101,1,3,0)="Entry package, Version 3.0 or greater."
  1. .. S ^ORD(101,RA101,1,0)="^^3^3^"_$$DT^XLFDT()_"^^"
  1. .. Q
  1. . D ERR^RAIPST5("RA EVSEND OR")
  1. . Q
  1. Q