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

RGRSPAR2.m

Go to the documentation of this file.
  1. RGRSPAR2 ;ALB/RJS-SENSITIVITY MESSAGE PARSER FOR CIRN ;1/8/98
  1. ;;1.0; CLINICAL INFO RESOURCE NETWORK ;;30 Apr 99
  1. EN(ARRAY) ;
  1. ;This procedure returns specific patient information into a supplied
  1. ;variable
  1. ;
  1. ;Input: Required Variable
  1. ;
  1. ; ARRAY - Supplied array variable (Passed by reference)
  1. ;
  1. ;Output: from segments built from the PATIENT file (#2) of sending site
  1. ;
  1. ; ARRAY(.01) - .01 field in PATIENT file (#2)
  1. ; ARRAY(.02) - .02 field in PATIENT file (#2)
  1. ; ARRAY(.03) - .03 field in PATIENT file (#2)
  1. ; ARRAY(.09) - .09 field in PATIENT file (#2)
  1. ; ARRAY(991.01) - 991.01 field in PATIENT file (#2)
  1. ; ARRAY(991.02) - 991.02 field in PATIENT file (#2)
  1. ; ARRAY(991.03) - 991.03 field in PATIENT file (#2)
  1. ; ARRAY("SENDING SITE") - sending sites station number
  1. ; ARRAY("SENSITIVITY") - sensitivity of the patient at sending site
  1. ; ARRAY("SENSITIVITY USER") - user at sending site that make patient
  1. ; ARRAY("SENSITIVITY DATE") - date when patient was marked sensitive
  1. ;
  1. N RGRSPID,RGC,RGRSPD1,SUBCOMP
  1. S RGC=$E(HL("ECH")),SUBCOMP=$E(HL("ECH"),2)
  1. S RGRSMSH=$$SEG1^RGRSUTIL("MSH",1,"MSH")
  1. S RGRSPID=$$SEG1^RGRSUTIL("PID",1,"PID")
  1. S RGRSPD1=$$SEG1^RGRSUTIL("PD1",1,"PD1")
  1. S RGRSZSN=$$SEG1^RGRSUTIL("ZSN",1,"ZSN")
  1. S @ARRAY@(.01)=$$FREE($$FMNAME^HLFNC($P(RGRSPID,HL("FS"),6),HL("ECH"))) ;NAME
  1. S @ARRAY@(.02)=$$SEX($P(RGRSPID,HL("FS"),9)) ;SEX
  1. S @ARRAY@(.03)=$$FREE($$FMDATE^HLFNC($P(RGRSPID,HL("FS"),8))) ;DOB
  1. S @ARRAY@(.09)=$$FREE($P(RGRSPID,HL("FS"),20)) ;SOCIAL SECURITY #
  1. S @ARRAY@(991.01)=$$FREE($P($P(RGRSPID,HL("FS"),3),"V",1)) ;INTEG CONTROL #
  1. S @ARRAY@(991.02)=$$FREE($P($P(RGRSPID,HL("FS"),3),"V",2)) ;CHECKSUM
  1. S @ARRAY@(991.03)=$$FREE($P($P(RGRSPD1,HL("FS"),4),RGC,1)) ;VCCI
  1. S @ARRAY@("SITENUM")=$$FREE($P($P(RGRSPD1,HL("FS"),4),RGC,3)) ;VCCI SITENUM
  1. S @ARRAY@("SENDING SITE")=$$FREE($P(RGRSMSH,HL("FS"),4)) ;SENDING SITE
  1. S @ARRAY@("SENSITIVITY")=$$FREE($P(RGRSZSN,HL("FS"),2)) ;SENSTIVITY
  1. S @ARRAY@("SENSITIVITY USER")=$$FREE($P(RGRSZSN,HL("FS"),3)) ;REMOTE PERSON WHO MADE PT. SENSITIVE
  1. S @ARRAY@("SENSITIVITY DATE")=$$FREE($$FMDATE^HLFNC($P(RGRSZSN,HL("FS"),4))) ;DATE/TIME PERSON MADE PT. SENSITIVE AT REMOTE SITE
  1. Q
  1. ;
  1. KILL ;
  1. K @ARRAY
  1. Q
  1. ;
  1. FREE(DATA) ;
  1. Q:$G(DATA)="" ""
  1. Q:DATA=HL("Q") """@"""
  1. Q $G(DATA)
  1. ;
  1. SEX(DATA) ;
  1. Q:$$FREE(DATA)="" ""
  1. Q:$$FREE(DATA)="""@""" """@"""
  1. I DATA="M" Q "MALE"
  1. I DATA="F" Q "FEMALE"
  1. Q "^<UNRESOLVED>"
  1. ;