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

RAAIPST2.m

Go to the documentation of this file.
  1. RAAIPST2 ;HIRMFO/GJC - Post-init number two (patch four) ;4/29/98 15:18
  1. VERSION ;;5.0;Radiology/Nuclear Medicine;**4**;Mar 16, 1998
  1. ;
  1. EN1 ; *** Adding entries to the Protocol (101) file ***
  1. I '$D(^ORD(101,"B","RA VOICE TCP REPORT")) D
  1. . N RA101,RAFDA
  1. . S RAFDA(101,"+1,",.01)="RA VOICE TCP REPORT"
  1. . S RAFDA(101,"+1,",1)="Client for Voice TCP rpt"
  1. . S RAFDA(101,"+1,",4)="subscriber"
  1. . S RAFDA(101,"+1,",12)="RADIOLOGY/NUCLEAR MEDICINE"
  1. . S RAFDA(101,"+1,",15)="Q"
  1. . S RAFDA(101,"+1,",20)="Q"
  1. . S RAFDA(101,"+1,",99)=$$FMTH^XLFDT($$NOW^XLFDT())
  1. . S RAFDA(101,"+1,",770.2)="RA-SERVER-IMG"
  1. . S RAFDA(101,"+1,",770.3)="ORU"
  1. . S RAFDA(101,"+1,",770.4)="R01"
  1. . S RAFDA(101,"+1,",770.6)="" ;IHS/ITSC/CLS 04/25/2003
  1. . S RAFDA(101,"+1,",770.7)="MED-RA"
  1. . S RAFDA(101,"+1,",770.11)="ACK"
  1. . S RAFDA(101,"+1,",771)="D ^RAHLBMS"
  1. . S RAFDA(101,"+1,",773.1)=$$N^RAAIPST1()
  1. . S RAFDA(101,"+1,",773.2)=$$N^RAAIPST1()
  1. . S RAFDA(101,"+1,",773.3)=$$N^RAAIPST1()
  1. . S RAFDA(101,"+1,",773.4)=$$Y^RAAIPST1()
  1. . D MSG("RA VOICE TCP REPORT",101),UPDATE^DIE("E","RAFDA")
  1. . I $D(^ORD(101,"B","RA VOICE TCP REPORT")) D Q
  1. .. S RA101=$O(^ORD(101,"B","RA VOICE TCP REPORT",0)) K RAFDA
  1. .. S RAFDA(101,RA101_",",770.95)=2.1 D FILE^DIE("E","RAFDA")
  1. .. S ^ORD(101,RA101,1,1,0)="Subscriber protocol for sending report to VISTA Radiology/Nuclear"
  1. .. S ^ORD(101,RA101,1,2,0)="Medicine. This protocol is used by the HL7 package to process messages"
  1. .. S ^ORD(101,RA101,1,3,0)="sent to VISTA from a COTS voice recognition unit using TCP/IP for message"
  1. .. S ^ORD(101,RA101,1,4,0)="flow. This protocol should be entered in the ITEM multiple of the RA"
  1. .. S ^ORD(101,RA101,1,5,0)="VOICE TCP SERVER RPT protocol."
  1. .. S ^ORD(101,RA101,1,0)="^^5^5^"_$$DT^XLFDT()_"^^"
  1. .. Q
  1. . D MSG("RA VOICE TCP REPORT",101,1)
  1. . Q
  1. I '$D(^ORD(101,"B","RA VOICE TCP SERVER RPT")) D
  1. . N RA101,RAFDA
  1. . S RAFDA(101,"+1,",.01)="RA VOICE TCP SERVER RPT"
  1. . S RAFDA(101,"+1,",1)="Voice TCP sends report to VISTA"
  1. . S RAFDA(101,"+1,",4)="event driver"
  1. . S RAFDA(101,"+1,",12)="RADIOLOGY/NUCLEAR MEDICINE"
  1. . S RAFDA(101,"+1,",99)=$$FMTH^XLFDT($$NOW^XLFDT())
  1. . S RAFDA(101,"+1,",770.1)="RA-CLIENT-TCP"
  1. . S RAFDA(101,"+1,",770.3)="ORU"
  1. . S RAFDA(101,"+1,",770.4)="R01"
  1. . S RAFDA(101,"+1,",770.6)="" ;IHS/ITSC/CLS 04/25/2003
  1. . S RAFDA(101,"+1,",772)="Q"
  1. . S RAFDA(101.01,"+2,+1,",.01)="RA VOICE TCP REPORT"
  1. . D MSG("RA VOICE TCP SERVER RPT",101),UPDATE^DIE("E","RAFDA")
  1. . I $D(^ORD(101,"B","RA VOICE TCP SERVER RPT")) D Q
  1. .. S RA101=$O(^ORD(101,"B","RA VOICE TCP SERVER RPT",0)) K RAFDA
  1. .. S RAFDA(101,RA101_",",770.95)=2.1 D FILE^DIE("E","RAFDA")
  1. .. S ^ORD(101,RA101,1,1,0)="Driver protocol for sending report to VISTA Radiology/Nuclear Medicine."
  1. .. S ^ORD(101,RA101,1,2,0)="This protocol is used by the HL7 package to process radiology/nuclear med"
  1. .. S ^ORD(101,RA101,1,3,0)="reports coming into VISTA from commercial voice recognition units using"
  1. .. S ^ORD(101,RA101,1,4,0)="TCP/IP for message flow."
  1. .. S ^ORD(101,RA101,1,0)="^^4^4^"_$$DT^XLFDT()_"^^"
  1. .. Q
  1. . D MSG("RA VOICE TCP SERVER RPT",101,1)
  1. . Q
  1. ; *** End adding entries to the Protocol (101) file ***
  1. Q
  1. MSG(ENTRY,FILE,ERR) ; display a status message pertaining to the addition
  1. ; of entries to files: 869.2, 870, 771 & 101. Display a status message
  1. ; when items are added to the Protocol (101) file.
  1. ; Variable list:
  1. ; ENTRY-> value of the .01 field for a particular file (60 chars max)
  1. ; FILE -> file # where the data will be added
  1. ; ERR -> err message? 1 if yes, else null
  1. N RACNT,RATXT,STRING,WORDS S RACNT=1,RATXT(RACNT)=" "
  1. S:$G(ERR) STRING="* ERROR * "
  1. S STRING=$G(STRING)_"Adding '"_$E(ENTRY,1,40)_"' to the "
  1. S STRING=$G(STRING)_$E($P($G(^DIC(FILE,0)),"^"),1,40)_" file."
  1. S:$G(ERR)&($D(DIERR)) STRING=$G(STRING)_" "_$E($G(^TMP("DIERR",$J,1,"TEXT",1)),1,115) ; display the 1st error text encountered! (there may be more errors. Because of possible string length error display only the first error.)
  1. S:$G(ERR) STRING=$G(STRING)_" IRM should investigate."
  1. F D Q:STRING=""
  1. . S WORDS=$L($E(STRING,1,71)," ")
  1. . S RACNT=RACNT+1,RATXT(RACNT)=$P(STRING," ",1,WORDS)
  1. . S STRING=$P(STRING," ",WORDS+1,999)
  1. . Q
  1. D MES^XPDUTL(.RATXT)
  1. Q