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

RA15PST1.m

Go to the documentation of this file.
  1. RA15PST1 ;HIRMFO/CRT - Post-init number one (patch fifteen) ;5/19/99
  1. VERSION ;;5.0;Radiology/Nuclear Medicine;**15**;Mar 16, 1998
  1. ;
  1. EN1 ; Edit entry in the LABEL PRINT FIELDS (78.7) file
  1. ;
  1. N RAFDA
  1. I '$D(^RA(78.7,"B","SSN OF PATIENT BARCODE-NO DASH")) D
  1. . D MSG("SSN OF PATIENT BARCODE",78.7)
  1. . S RAFDA(78.7,"+1,",.01)="SSN OF PATIENT BARCODE-NO DASH"
  1. . S RAFDA(78.7,"+1,",2)="P"
  1. . S RADFA(78.7,"+1,",3)="SSN:"
  1. . S RAFDA(78.7,"+1,",4)="Barcoded SSN"
  1. . S RAFDA(78.7,"+1,",5)="RABSSN"
  1. . D UPDATE^DIE("E","RAFDA")
  1. . S RA100=$O(^RA(78.7,"B","SSN OF PATIENT BARCODE-NO DASH",0))
  1. . I RA100="" D MSG("SSN OF PATIENT BARCODE",78.7,1) Q
  1. . S ^RA(78.7,RA100,"E")="S RABSSN=$TR($$SSN^RAUTL,""-"",""""),RABSSN=$$BCDE^RAUTL18($S(RABSSN=""Unknown"":"""",1:RABSSN))"
  1. ;
  1. D BMES^XPDUTL(" ") ; greater readability
  1. Q
  1. MSG(ENTRY,FILE,ERR) ; display a status message pertaining to the addition
  1. ; of entries to files: 78.7,
  1. ;
  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 -> only passed if error message required
  1. ;
  1. N RACNT,RATXT,STRING,WORDS S RACNT=1,RATXT(RACNT)=" "
  1. S STRING="Adding '"_$E(ENTRY,1,40)_"' to the "
  1. S:$G(ERR) STRING="** ERROR "_STRING
  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