DGPT501P ;ALB/MTC,HIOFO/FT - Parse 501 Record ;10/29/2014 3:14pm
;;5.3;Registration;**884**;Aug 13, 1993;Build 31
;
SET ; Set up 501 variables. Called from PARSE^DGPT501
D:DGPTFMT=2 SET9
D:DGPTFMT=3 SET10
Q
SET9 ;record layout before icd10 turned on
S DGPTMSR=$E(DGPTSTR,41,46) ;specialty cdr code
S DGPTMSC=$E(DGPTSTR,47,48) ;specialty code
S DGPTMLD=$E(DGPTSTR,49,51) ;leave days
S DGPTMPD=$E(DGPTSTR,52,54) ;pass days
S DGPTMSI=$E(DGPTSTR,55) ;spinal cord injury indicator
S (DGPTMD1,DGPTMD11)=$P($E(DGPTSTR,56,62)," ") ;diagnosis codes 1-5
S DGPTMD2=$P($E(DGPTSTR,63,69)," ")
S DGPTMD3=$P($E(DGPTSTR,70,76)," ")
S DGPTMD4=$P($E(DGPTSTR,77,83)," ")
S DGPTMD5=$P($E(DGPTSTR,84,90)," ")
S DGPTMXX=$E(DGPTSTR,91,99) ;spaces, not used
S DGPTMLR=$E(DGPTSTR,100,105) ;physical location cdr code
S DGPTMLC=$E(DGPTSTR,106,107) ;physical location code
S DGPTMBS=$E(DGPTSTR,108) ;bed status (discharge movement only)
S DGPTMLG=$E(DGPTSTR,109) ;legionnaires indicator
S DGPTMSU=$E(DGPTSTR,110) ;suicide indicator
S DGPTMDG=$E(DGPTSTR,111,114) ;drug indicator
S DGPTMXIV=$E(DGPTSTR,115) ;axes 4 & 5
S DGPTMXV1=$E(DGPTSTR,116,117) ;axes 4 & 5
S DGPTMXV2=$E(DGPTSTR,118,119) ;axes 4 & 5
S DGPT50SR=$E(DGPTSTR,120) ;service
Q
SET10 ;record layout after icd10 turned on
S DGPTMSR=$E(DGPTSTR,41,46) ;specialty cdr code
S DGPTMSC=$E(DGPTSTR,47,48) ;specialty code
S DGPTMLD=$E(DGPTSTR,49,51) ;leave days
S DGPTMPD=$E(DGPTSTR,52,54) ;pass days
S DGPTMSI=$E(DGPTSTR,55) ;spinal cord injury indicator
S DGPTMD1=$E(DGPTSTR,56,62),DGPTMPOA1=$E(DGPTSTR,63) ;diagnosis & poa codes
S DGPTMD2=$E(DGPTSTR,64,70),DGPTMPOA2=$E(DGPTSTR,71)
S DGPTMD3=$E(DGPTSTR,72,78),DGPTMPOA3=$E(DGPTSTR,79)
S DGPTMD4=$E(DGPTSTR,80,86),DGPTMPOA4=$E(DGPTSTR,87)
S DGPTMD5=$E(DGPTSTR,88,94),DGPTMPOA5=$E(DGPTSTR,95)
S DGPTMD6=$E(DGPTSTR,96,102),DGPTMPOA6=$E(DGPTSTR,103)
S DGPTMD7=$E(DGPTSTR,104,110),DGPTMPOA7=$E(DGPTSTR,111)
S DGPTMD8=$E(DGPTSTR,112,118),DGPTMPOA8=$E(DGPTSTR,119)
S DGPTMD9=$E(DGPTSTR,120,126),DGPTMPOA9=$E(DGPTSTR,127)
S DGPTMD10=$E(DGPTSTR,128,134),DGPTMPOA10=$E(DGPTSTR,135)
S DGPTMD11=$E(DGPTSTR,136,142),DGPTMPOA11=$E(DGPTSTR,143)
S DGPTMD12=$E(DGPTSTR,144,150),DGPTMPOA12=$E(DGPTSTR,151)
S DGPTMD13=$E(DGPTSTR,152,158),DGPTMPOA13=$E(DGPTSTR,159)
S DGPTMD14=$E(DGPTSTR,160,166),DGPTMPOA14=$E(DGPTSTR,167)
S DGPTMD15=$E(DGPTSTR,168,174),DGPTMPOA15=$E(DGPTSTR,175)
S DGPTMD16=$E(DGPTSTR,176,182),DGPTMPOA16=$E(DGPTSTR,183)
S DGPTMD17=$E(DGPTSTR,184,190),DGPTMPOA17=$E(DGPTSTR,191)
S DGPTMD18=$E(DGPTSTR,192,198),DGPTMPOA18=$E(DGPTSTR,199)
S DGPTMD19=$E(DGPTSTR,200,206),DGPTMPOA19=$E(DGPTSTR,207)
S DGPTMD20=$E(DGPTSTR,208,214),DGPTMPOA20=$E(DGPTSTR,215)
S DGPTMD21=$E(DGPTSTR,216,222),DGPTMPOA21=$E(DGPTSTR,223)
S DGPTMD22=$E(DGPTSTR,224,230),DGPTMPOA22=$E(DGPTSTR,231)
S DGPTMD23=$E(DGPTSTR,232,238),DGPTMPOA23=$E(DGPTSTR,239)
S DGPTMD24=$E(DGPTSTR,240,246),DGPTMPOA24=$E(DGPTSTR,247)
S DGPTMD25=$E(DGPTSTR,248,254),DGPTMPOA25=$E(DGPTSTR,255)
S DGPTAPSSN=$E(DGPTSTR,256,264) ;attending physician ssn
S DGPTMLR=$E(DGPTSTR,265,270) ;physical location cdr code
S DGPTMLC=$E(DGPTSTR,271,272) ;physical location code
S DGPTMBS=$E(DGPTSTR,273) ;bed status (discharge movement only)
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDGPT501P 3285 printed Dec 13, 2024@02:51:19 Page 2
DGPT501P ;ALB/MTC,HIOFO/FT - Parse 501 Record ;10/29/2014 3:14pm
+1 ;;5.3;Registration;**884**;Aug 13, 1993;Build 31
+2 ;
SET ; Set up 501 variables. Called from PARSE^DGPT501
+1 if DGPTFMT=2
DO SET9
+2 if DGPTFMT=3
DO SET10
+3 QUIT
SET9 ;record layout before icd10 turned on
+1 ;specialty cdr code
SET DGPTMSR=$EXTRACT(DGPTSTR,41,46)
+2 ;specialty code
SET DGPTMSC=$EXTRACT(DGPTSTR,47,48)
+3 ;leave days
SET DGPTMLD=$EXTRACT(DGPTSTR,49,51)
+4 ;pass days
SET DGPTMPD=$EXTRACT(DGPTSTR,52,54)
+5 ;spinal cord injury indicator
SET DGPTMSI=$EXTRACT(DGPTSTR,55)
+6 ;diagnosis codes 1-5
SET (DGPTMD1,DGPTMD11)=$PIECE($EXTRACT(DGPTSTR,56,62)," ")
+7 SET DGPTMD2=$PIECE($EXTRACT(DGPTSTR,63,69)," ")
+8 SET DGPTMD3=$PIECE($EXTRACT(DGPTSTR,70,76)," ")
+9 SET DGPTMD4=$PIECE($EXTRACT(DGPTSTR,77,83)," ")
+10 SET DGPTMD5=$PIECE($EXTRACT(DGPTSTR,84,90)," ")
+11 ;spaces, not used
SET DGPTMXX=$EXTRACT(DGPTSTR,91,99)
+12 ;physical location cdr code
SET DGPTMLR=$EXTRACT(DGPTSTR,100,105)
+13 ;physical location code
SET DGPTMLC=$EXTRACT(DGPTSTR,106,107)
+14 ;bed status (discharge movement only)
SET DGPTMBS=$EXTRACT(DGPTSTR,108)
+15 ;legionnaires indicator
SET DGPTMLG=$EXTRACT(DGPTSTR,109)
+16 ;suicide indicator
SET DGPTMSU=$EXTRACT(DGPTSTR,110)
+17 ;drug indicator
SET DGPTMDG=$EXTRACT(DGPTSTR,111,114)
+18 ;axes 4 & 5
SET DGPTMXIV=$EXTRACT(DGPTSTR,115)
+19 ;axes 4 & 5
SET DGPTMXV1=$EXTRACT(DGPTSTR,116,117)
+20 ;axes 4 & 5
SET DGPTMXV2=$EXTRACT(DGPTSTR,118,119)
+21 ;service
SET DGPT50SR=$EXTRACT(DGPTSTR,120)
+22 QUIT
SET10 ;record layout after icd10 turned on
+1 ;specialty cdr code
SET DGPTMSR=$EXTRACT(DGPTSTR,41,46)
+2 ;specialty code
SET DGPTMSC=$EXTRACT(DGPTSTR,47,48)
+3 ;leave days
SET DGPTMLD=$EXTRACT(DGPTSTR,49,51)
+4 ;pass days
SET DGPTMPD=$EXTRACT(DGPTSTR,52,54)
+5 ;spinal cord injury indicator
SET DGPTMSI=$EXTRACT(DGPTSTR,55)
+6 ;diagnosis & poa codes
SET DGPTMD1=$EXTRACT(DGPTSTR,56,62)
SET DGPTMPOA1=$EXTRACT(DGPTSTR,63)
+7 SET DGPTMD2=$EXTRACT(DGPTSTR,64,70)
SET DGPTMPOA2=$EXTRACT(DGPTSTR,71)
+8 SET DGPTMD3=$EXTRACT(DGPTSTR,72,78)
SET DGPTMPOA3=$EXTRACT(DGPTSTR,79)
+9 SET DGPTMD4=$EXTRACT(DGPTSTR,80,86)
SET DGPTMPOA4=$EXTRACT(DGPTSTR,87)
+10 SET DGPTMD5=$EXTRACT(DGPTSTR,88,94)
SET DGPTMPOA5=$EXTRACT(DGPTSTR,95)
+11 SET DGPTMD6=$EXTRACT(DGPTSTR,96,102)
SET DGPTMPOA6=$EXTRACT(DGPTSTR,103)
+12 SET DGPTMD7=$EXTRACT(DGPTSTR,104,110)
SET DGPTMPOA7=$EXTRACT(DGPTSTR,111)
+13 SET DGPTMD8=$EXTRACT(DGPTSTR,112,118)
SET DGPTMPOA8=$EXTRACT(DGPTSTR,119)
+14 SET DGPTMD9=$EXTRACT(DGPTSTR,120,126)
SET DGPTMPOA9=$EXTRACT(DGPTSTR,127)
+15 SET DGPTMD10=$EXTRACT(DGPTSTR,128,134)
SET DGPTMPOA10=$EXTRACT(DGPTSTR,135)
+16 SET DGPTMD11=$EXTRACT(DGPTSTR,136,142)
SET DGPTMPOA11=$EXTRACT(DGPTSTR,143)
+17 SET DGPTMD12=$EXTRACT(DGPTSTR,144,150)
SET DGPTMPOA12=$EXTRACT(DGPTSTR,151)
+18 SET DGPTMD13=$EXTRACT(DGPTSTR,152,158)
SET DGPTMPOA13=$EXTRACT(DGPTSTR,159)
+19 SET DGPTMD14=$EXTRACT(DGPTSTR,160,166)
SET DGPTMPOA14=$EXTRACT(DGPTSTR,167)
+20 SET DGPTMD15=$EXTRACT(DGPTSTR,168,174)
SET DGPTMPOA15=$EXTRACT(DGPTSTR,175)
+21 SET DGPTMD16=$EXTRACT(DGPTSTR,176,182)
SET DGPTMPOA16=$EXTRACT(DGPTSTR,183)
+22 SET DGPTMD17=$EXTRACT(DGPTSTR,184,190)
SET DGPTMPOA17=$EXTRACT(DGPTSTR,191)
+23 SET DGPTMD18=$EXTRACT(DGPTSTR,192,198)
SET DGPTMPOA18=$EXTRACT(DGPTSTR,199)
+24 SET DGPTMD19=$EXTRACT(DGPTSTR,200,206)
SET DGPTMPOA19=$EXTRACT(DGPTSTR,207)
+25 SET DGPTMD20=$EXTRACT(DGPTSTR,208,214)
SET DGPTMPOA20=$EXTRACT(DGPTSTR,215)
+26 SET DGPTMD21=$EXTRACT(DGPTSTR,216,222)
SET DGPTMPOA21=$EXTRACT(DGPTSTR,223)
+27 SET DGPTMD22=$EXTRACT(DGPTSTR,224,230)
SET DGPTMPOA22=$EXTRACT(DGPTSTR,231)
+28 SET DGPTMD23=$EXTRACT(DGPTSTR,232,238)
SET DGPTMPOA23=$EXTRACT(DGPTSTR,239)
+29 SET DGPTMD24=$EXTRACT(DGPTSTR,240,246)
SET DGPTMPOA24=$EXTRACT(DGPTSTR,247)
+30 SET DGPTMD25=$EXTRACT(DGPTSTR,248,254)
SET DGPTMPOA25=$EXTRACT(DGPTSTR,255)
+31 ;attending physician ssn
SET DGPTAPSSN=$EXTRACT(DGPTSTR,256,264)
+32 ;physical location cdr code
SET DGPTMLR=$EXTRACT(DGPTSTR,265,270)
+33 ;physical location code
SET DGPTMLC=$EXTRACT(DGPTSTR,271,272)
+34 ;bed status (discharge movement only)
SET DGPTMBS=$EXTRACT(DGPTSTR,273)
+35 QUIT