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

AMHPEDIT.m

Go to the documentation of this file.
  1. AMHPEDIT ; IHS/CMI/LAB - INPUT TX ON PATIENT FIELD OF BH RECORD ;
  1. ;;4.0;IHS BEHAVIORAL HEALTH;;MAY 14, 2010
  1. ;
  1. ;
  1. Q:'$D(AMHDATE)
  1. I AUPNDOD,$P(AMHDATE,".")>AUPNDOD W !," <Patient died before the visit date: DOD is "_$$FMTE^XLFDT(AUPNDOD)_">" Q
  1. I $P(AMHDATE,".")<AUPNDOB W !," <Patient born after the record date>" K X Q
  1. Q
  1. ;
  1. ;
  1. DODGP(P,D) ;EP - called from screenman
  1. ;
  1. Q
  1. I $G(P)="" Q
  1. NEW T
  1. K T
  1. I $$DOD^AUPNPAT(P),$P(D,".")>$$DOD^AUPNPAT(P) D
  1. .S T(1)=" <Patient died before the visit date: DOD is "_$$FMTE^XLFDT($$DOD^AUPNPAT(P))_">"
  1. .S T(2)=" If you do not want to create a visit for this patient, please remove"
  1. .S T(3)=" them from the list by using the '@' to delete them."
  1. .D HLP^DDSUTL(.T)
  1. Q
  1. PTSECG ;EP - called from screenman
  1. I '$D(X) Q
  1. NEW AMHRESU,HLP,C,J
  1. S C=0
  1. D PTSEC^AMHUTIL2(.AMHRESU,X,1)
  1. I '$G(AMHRESU(1)) Q
  1. I $G(AMHRESU(1))=3!($G(AMHRESU(1))=4)!($G(AMHRESU(1))=5) D Q
  1. .S J=1 F S J=$O(AMHRESU(J)) Q:J'=+J D EN^DDIOL($$CTR(AMHRESU(J)))
  1. .K X
  1. S J=1 F S J=$O(AMHRESU(J)) Q:J'=+J D EN^DDIOL($$CTR(AMHRESU(J)))
  1. D EN^DDIOL("If you don't want to access this patient, delete them from the group")
  1. D EN^DDIOL("using the @")
  1. Q
  1. CTR(X,Y) ;EP - Center X in a field Y wide.
  1. Q $J("",$S($D(Y):Y,1:IOM)-$L(X)\2)_X
  1. ;----------