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

SDAMEP2.m

Go to the documentation of this file.
  1. SDAMEP2 ;ALB/CAW,MGD - Extended Display (Patient Data) ; NOV 13, 2024
  1. ;;5.3;Scheduling;**258,325,441,777,895**;Aug 13, 1993;Build 11
  1. ;
  1. ; Reference to ^$$ELIG^DGCOMPACTELIG in ICR #7462
  1. ;
  1. PDATA ; Patient Data
  1. F SD=0,.11,.13,.32,.322,.321,.36,.52 S SD(SD)=$G(^DPT(DFN,SD))
  1. S SD("CV")=$$CVEDT^DGCV(DFN,SDT)
  1. S VAIP("D")="L",VAIP("L")="" D INP^DGPMV10
  1. S SDFSTCOL=16,SDSECCOL=60
  1. S X="" D SET^SDAMEP1($$SETSTR^VALM1("*** Patient Information ***",X,25,30))
  1. D CNTRL^VALM10(SDLN,25,30,IOINHI,IOINORM)
  1. PTDOB ; Date of Birth and SSN Info
  1. ;
  1. S X="",X=$$SETSTR^VALM1("Date of Birth:",X,1,14)
  1. S X=$$SETSTR^VALM1($$FTIME^VALM1($P(SD(0),U,3)),X,SDFSTCOL,18)
  1. S X=$$SETSTR^VALM1(" ID:",X,55,4)
  1. S X=$$SETSTR^VALM1(VA("PID"),X,SDSECCOL,20)
  1. D SET^SDAMEP1(X)
  1. PTSEX ; Sex and Marital Status Info
  1. ;
  1. S X="",X=$$SETSTR^VALM1("Sex:",X,11,4)
  1. S X=$$SETSTR^VALM1($S($P(SD(0),U,2)="F":"FEMALE",$P(SD(0),U,2)="M":"MALE",1:"UNKNOWN"),X,SDFSTCOL,18)
  1. S X=$$SETSTR^VALM1("Marital Status:",X,44,15)
  1. S X=$$SETSTR^VALM1($P($G(^DIC(11,+$P(SD(0),U,5),0)),U),X,SDSECCOL,20)
  1. D SET^SDAMEP1(X)
  1. PTREL ; Religious Pref. Info
  1. ;
  1. S X="",X=$$SETSTR^VALM1("Religious Pref.:",X,43,16)
  1. S X=$$SETSTR^VALM1($P($G(^DIC(13,+$P(SD(0),U,8),0)),U),X,SDSECCOL,20)
  1. D SET^SDAMEP1(X)
  1. PTMT ; Means Test Info
  1. ;
  1. S SDMT=$$LST^DGMTU(DFN),X="" G:$P(SDMT,U,4)="N" PTCO I +SDMT D G PTMTQ
  1. .S X=$$SETSTR^VALM1("Means Test:",X,4,11)
  1. .S X=$$SETSTR^VALM1($P($$FMT^SDUTL2(DFN),U),X,SDFSTCOL,20)
  1. .S X=$$SETSTR^VALM1("Last Means Test:",X,43,16)
  1. .S X=$$SETSTR^VALM1($$FDATE^VALM1($P(SDMT,U,2)),X,SDSECCOL,20)
  1. PTCO S SDMT=$$LST^DGMTU(DFN,"",2),X="" I +SDMT D
  1. .S X=$$SETSTR^VALM1("Co-Pay Test:",X,3,12)
  1. .S X=$$SETSTR^VALM1($P($$FCO^SDUTL2(DFN),U,2),X,SDFSTCOL,10)
  1. .S X=$$SETSTR^VALM1("Last Co-Pay Test:",X,42,17)
  1. .S X=$$SETSTR^VALM1($$FDATE^VALM1($P(SDMT,U,2)),X,SDSECCOL,20)
  1. PTMTQ D SET^SDAMEP1(X)
  1. PTELG ; Primary Eligibility and Period of Service Info
  1. ;
  1. S X="",X=$$SETSTR^VALM1("Primary Elig.:",X,1,14)
  1. S X=$$SETSTR^VALM1($P($G(^DIC(8,+$P(SD(.36),U),0)),U,6),X,SDFSTCOL,21)
  1. S X=$$SETSTR^VALM1("POS:",X,55,4)
  1. S X=$$SETSTR^VALM1($P($G(^DIC(21,+$P(SD(.32),U,3),0)),U),X,SDSECCOL,20)
  1. D SET^SDAMEP1(X)
  1. ;
  1. N SDCOMPACT
  1. S SDCOMPACT=$$ELIG^DGCOMPACTELIG(DFN,"SDAMEP2")
  1. S X="",X=$$SETSTR^VALM1("COMPACT Elig.:",X,1,14)
  1. S X=$$SETSTR^VALM1(SDCOMPACT,X,SDFSTCOL,21)
  1. D SET^SDAMEP1(X)
  1. ;
  1. PTADD ; Patient Address
  1. ;
  1. S X="",X=($$SETSTR^VALM1("Address:",X,7,8))
  1. S X=$$SETSTR^VALM1("Phone:",X,53,6)
  1. S X=$$SETSTR^VALM1($P(SD(.13),U),X,SDSECCOL,20)
  1. D SET^SDAMEP1(X)
  1. S X="",X=($$SETSTR^VALM1($P(SD(.11),U),X,10,30))
  1. S X=$$SETSTR^VALM1("Cell Phone:",X,48,11)
  1. S X=$$SETSTR^VALM1($S(($P(SD(.13),U,4)'=""):$P(SD(.13),U,4),1:"UNANSWERED"),X,SDSECCOL,20)
  1. D SET^SDAMEP1(X)
  1. S X="",SDPAGFLG=0
  1. I $P(SD(.11),U,2)'="" D
  1. .S X="",X=($$SETSTR^VALM1($P(SD(.11),U,2),X,10,30))
  1. .S X=$$SETSTR^VALM1("Pager #:",X,51,8)
  1. .S X=$$SETSTR^VALM1($S(($P(SD(.13),U,5)'=""):$P(SD(.13),U,5),1:"UNANSWERED"),X,SDSECCOL,20),SDPAGFLG=1
  1. D:X'="" SET^SDAMEP1(X)
  1. ; retrieve country info -- PERM country is piece 10 of .11
  1. N FILE,CNTRY,FORIEN,FOREIGN
  1. S FILE=779.004,FORIEN=$P(SD(.11),U,10),CNTRY=$$GET1^DIQ(FILE,FORIEN_",",2),CNTRY=$$UPPER^VALM1(CNTRY),FOREIGN=$$FORIEN^DGADDUTL(FORIEN)
  1. I 'FOREIGN D
  1. . N SDZIP S SDZIP=$P(SD(.11),U,12) S:$E(SDZIP,6,10)'="" SDZIP=$E(SDZIP,1,5)_"-"_$E(SDZIP,6,10)
  1. . S X="",X=($$SETSTR^VALM1($P(SD(.11),U,4)_", "_$P($G(^DIC(5,+$P(SD(.11),U,5),0)),U)_" "_SDZIP,X,10,45))
  1. E D
  1. . S X="",X=($$SETSTR^VALM1($P(SD(.11),U,9)_" "_$P(SD(.11),U,4)_" "_$P(SD(.11),U,8),X,10,45))
  1. I 'SDPAGFLG D
  1. .S X=$$SETSTR^VALM1("Pager #:",X,51,8)
  1. .S X=$$SETSTR^VALM1($S(($P(SD(.13),U,5)'=""):$P(SD(.13),U,5),1:"UNANSWERED"),X,SDSECCOL,20)
  1. D SET^SDAMEP1(X) K SDPAGFLG
  1. S X="",X=$$SETSTR^VALM1(CNTRY,X,10,45)
  1. D SET^SDAMEP1(X)
  1. S X="",X=$$SETSTR^VALM1("EMAIL ADDRESS:",X,1,14)
  1. S X=$$SETSTR^VALM1($S(($P(SD(.13),U,3)'=""):$P(SD(.13),U,3),1:"UNANSWERED"),X,SDFSTCOL,45)
  1. D SET^SDAMEP1(X)
  1. PTEXP ; Radiation and Status
  1. ;
  1. S X="",X=$$SETSTR^VALM1("Radiation Exposure:",X,1,19)
  1. S X=$$SETSTR^VALM1($$FYNUNK^SDUTL2($P(SD(.321),U,3)),X,21,7)
  1. S X=$$SETSTR^VALM1("Status:",X,52,7)
  1. S A=$S("^3^5^"[("^"_+DGPMVI(2)_"^"):0,1:+DGPMVI(2)),SDST=$S('A:"IN",1:"")_"ACTIVE ",SDSTA=$S("^4^5^"[("^"_+DGPMVI(2)_"^"):"LODGER",1:"INPATIENT")
  1. I '$D(^DGPM("C",DFN)) S SDST="NO INPT./LOD. ACT.",SDSTA=""
  1. S X=$$SETSTR^VALM1(SDST_SDSTA,X,SDSECCOL,20)
  1. D SET^SDAMEP1(X)
  1. PTPOW ; Prisoner of War Info and Last Admission Date
  1. ;
  1. S X="",X=$$SETSTR^VALM1("Prisoner of War:",X,4,16)
  1. S X=$$SETSTR^VALM1($$FYNUNK^SDUTL2($P(SD(.52),U,5)),X,21,7)
  1. S X=$$SETSTR^VALM1("Last Admit/Lodger Date:",X,36,23)
  1. I +DGPMVI(13,1) S X=$$SETSTR^VALM1($$FTIME^VALM1(+DGPMVI(13,1)),X,SDSECCOL,18)
  1. D SET^SDAMEP1(X)
  1. PTAO ; Agent Orange Exposure and Last Discharge Date
  1. S X="",X=$$SETSTR^VALM1("AO Exp/Loc:",X,9,11)
  1. S X=$$SETSTR^VALM1($$FYNUNK^SDUTL2($P(SD(.321),U,2))_$S($P(SD(.321),U,13)="V":"/VIET",$P(SD(.321),U,13)="K":"/DMZ",$P(SD(.321),U,13)="O":"/OTH",$P(SD(.321),U,13)="B":"/BWN",1:""),X,21,14) ;SD*5.3*777 - Add BWN
  1. S X=$$SETSTR^VALM1("Last Disch./Lodger Date:",X,35,24)
  1. S SDDISCH=+$G(^DGPM(+DGPMVI(17),0))
  1. I +SDDISCH S X=$$SETSTR^VALM1($$FTIME^VALM1(SDDISCH),X,SDSECCOL,18)
  1. D SET^SDAMEP1(X)
  1. CV ;Combat vet
  1. S X="",X=$$SETSTR^VALM1("Combat Veteran:",X,5,15)
  1. S X=$$SETSTR^VALM1($$FYNUNK^SDUTL2($S($P(SD("CV"),U,1)>0:"Y",1:"N")),X,21,7)
  1. S X=$$SETSTR^VALM1("Combat Veteran End Date:",X,35,24)
  1. I $P(SD("CV"),U,1)>0 D
  1. .S X=$$SETSTR^VALM1($$FTIME^VALM1($P(SD("CV"),U,2)),X,SDSECCOL,18)
  1. E S X=$$SETSTR^VALM1("N/A",X,SDSECCOL,3)
  1. D SET^SDAMEP1(X)
  1. SHAD ;PROJ 112/SHAD
  1. S X="",X=$$SETSTR^VALM1("PROJ 112/SHAD:",X,6,14)
  1. S X=$$SETSTR^VALM1($$FYNUNK^SDUTL2($S($P(SD(.321),U,15)>0:"Y",1:"N")),X,21,7)
  1. SWASIA ;SW Asia
  1. S X=$$SETSTR^VALM1("SW Asia Conditions:",X,40,19)
  1. S X=$$SETSTR^VALM1($$FYNUNK^SDUTL2($P(SD(.322),U,13)),X,SDSECCOL,20)
  1. D SET^SDAMEP1(X)
  1. D SET^SDAMEP1("")
  1. Q