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

RA12PST2.m

Go to the documentation of this file.
  1. RA12PST2 ;HIRMFO/CRT - Post-init functions (patch seventeen) ;5/20/99
  1. VERSION ;;5.0;Radiology/Nuclear Medicine;**17**;Mar 16, 1998
  1. ;
  1. MSG(ENTRY,FILE,ERR) ; display a status message pertaining to the addition
  1. ; of entries to files: 870 & 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/Editing '"_$E(ENTRY,1,40)_"' in 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
  1. CLIENT() ; return 'CLIENT (SENDER)', for CLIENT/SERVER (400.03) field
  1. ; in file 870
  1. Q "CLIENT (SENDER)"
  1. N() ; return 'NO', for various fields in file 101
  1. Q "NO"
  1. SLISTN() ; return 'SINGLE LISTENER', for CLIENT/SERVER (400.03) field
  1. ; in file 870
  1. Q "SINGLE LISTENER"
  1. TCP() ; return 'TCP' for LLP TYPE (2) field in file 870
  1. Q "TCP"
  1. Y() ; return 'YES', for PERSISTENT (400.04) field in file 870
  1. Q "YES"
  1. PKG() ; Return the name of the package
  1. Q "RADIOLOGY/NUCLEAR MEDICINE"
  1. PROID() ; Delete the Processing ID field
  1. Q "@"
  1. ACKTO() ; Return the ACK timeout for CLIENT(SENDER)s
  1. Q 300
  1. TSTMP() ; Timestamp the protocol entry point with current date/time (in $H format)
  1. Q $$FMTH^XLFDT($$NOW^XLFDT())
  1. ;
  1. DELITEM ; Delete Item multiple from RA event driver protocols
  1. N RAA,RAB,RARR,RAX,RAX1,RAY,RAZ
  1. F RAX="RA REG","RA EXAMINED","RA CANCEL","RA RPT" D
  1. .S RARR(RAX)=$$FIND1^DIC(101,,"X",RAX)
  1. .S RARR(RAX_" 2.3")=+$$FIND1^DIC(101,,"X",RAX_" 2.3")
  1. .Q
  1. F RAX="RA TALKLINK TCP SERVER RPT","RA PSCRIBE TCP SERVER RPT","RA VOICE TCP SERVER RPT" D
  1. .S RARR(RAX)=+$$FIND1^DIC(101,,"X",RAX)
  1. .Q
  1. ; remove RA subscriber type items
  1. S RAX="" F S RAX=$O(RARR(RAX)) Q:RAX="" D
  1. .S RAX1=+$G(RARR(RAX)) Q:'RAX1 ; must be a protocol ien
  1. .S:'$D(^ORD(101,RAX1,10,0)) ^ORD(101,RAX1,10,0)="^101.01PA^^0"
  1. .S RAY=0 F S RAY=$O(^ORD(101,RAX1,10,RAY)) Q:'RAY D
  1. ..S RAZ=+$G(^ORD(101,RAX1,10,RAY,0)) ; get the item ien
  1. ..S RAA=$$GET1^DIQ(101,RAZ,.01,"I") ; protocol name
  1. ..S RAB=$$GET1^DIQ(101,RAZ,4,"I") ; protocol type
  1. ..Q:$E(RAA,1,2)'="RA"!(RAB'="S") ; must be a RA subscriber item type
  1. ..S RA101(101.01,RAY_","_RAX1_",",.01)="@" D FILE^DIE("K","RA101")
  1. ..Q
  1. .Q
  1. Q