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

ACHSDARR.m

Go to the documentation of this file.
  1. ACHSDARR ; IHS/ITSC/PMF - PATIENT RELEASE OF INFORMATION FOR ALT RES ; [ 10/16/2001 8:16 AM ]
  1. ;;3.1;CONTRACT HEALTH MGMT SYSTEM;;JUN 11, 2001
  1. ;
  1. ;'PARENT OR GUARDIAN (CHILD)'
  1. S ACHDNAME=$P($G(^ACHSDEN(DUZ(2),"D",ACHSA,800,ACHDALRS,0)),U,4)
  1. G START:ACHDNAME'=""
  1. ;
  1. ;'IS PATIENT REGISTERED?'
  1. I $$DN^ACHS(0,6)="Y" S ACHDNAME=$P($G(^DPT($$DN^ACHS(0,7),0)),U) G START
  1. I $$DN^ACHS(0,6)="N" S ACHDNAME=$$DN^ACHS(10,1)
  1. ;
  1. START ;
  1. W @IOF,!!!!!!!!!!
  1. S ACHD=0
  1. F I=1:1:$L(ACHDNAME) S ACHD=$E(ACHDNAME,I) Q:ACHD="," G:ACHD="" START1
  1. S ACHDNAME=$P(ACHDNAME,",",2)_" "_$P(ACHDNAME,",")
  1. ;
  1. START1 ;
  1. S X=$P($G(^AUTNINS($P($G(^ACHSDEN(DUZ(2),"D",ACHSA,800,ACHDALRS,0)),U),0)),U)
  1. S X="I, |_|"_ACHDNAME_"|_|, hereby authorize and request the |_|"_X_"|_| to release any and all information contained in my files to the Indian Health Service, Contract Health Services (CHS) Office."
  1. D ^DIWP
  1. S X="Information in the file should be forwarded to the following address: "
  1. D ^DIWP,^DIWW
  1. W !!!?DIWL+10,$$SUD^ACHS(1)
  1. I $L($$SUD^ACHS(7)) W !?DIWL+10,$$SUD^ACHS(7)
  1. ;
  1. W !?DIWL+10,$$SUD^ACHS(2),!?DIWL+10,$$SUD^ACHS(3),", ",$P($G(^DIC(5,$$SUD^ACHS(4),0)),U,2)," ",$$SUD^ACHS(5),!?DIWL+10,"Telephone: ",$$SUD^ACHS(6),!?DIWL+10,"ATTN: Contract Health",!!!
  1. S X="This information will aid the CHS Office in assisting and/or representing me in completing my application for alternate resources."
  1. D ^DIWP,^DIWW
  1. W !!!?DIWL+5,"Dated this ",$$DATE(DT,"DD",1)," day of ",$$DATE(DT,"MM",1),", ",$$DATE(DT,"YY"),"."
  1. W !!!!!?DIWL+30,"_________________________________",!!?DIWL+30,ACHDNAME
  1. END ;
  1. Q
  1. ;
  1. DATE(D,P,O) ;EP - "D" = Date, "P" = Part of Date, "O" = Option
  1. ; if Month or day.
  1. I '$G(D) Q -1
  1. I $L($G(P))'=2 Q -1
  1. I "MMDDYY"'[P Q -1
  1. S O=$G(O)
  1. S Y=$$FMTE^XLFDT(D)
  1. I P="YY" Q $P(Y," ",3)
  1. I P="MM" D Q Y
  1. . S Y=$P(Y," ",1)
  1. . Q:'O
  1. . S %=Y,Y=$S(%="Jan":"January",%="Feb":"February",%="Mar":"March",%="Apr":"April",%="May":%,%="Jun":"June",%="Jul":"July",%="Aug":"August",%="Sep":"September",%="Oct":"October",%="Nov":"November",1:"December")
  1. .Q
  1. S Y=$P(Y," ",2),Y=+$P(Y,",",1)
  1. Q:'O Y
  1. S %=Y,Y=Y_$S(%=1:"st",%=2:"nd",%=3:"rd",((%>3)&(%<21)):"th",%=21:"st",%=22:"nd",%=23:"rd",((%>23)&(%<31)):"th",1:"st")
  1. Q Y
  1. ;