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

AGFACE1.m

Go to the documentation of this file.
AGFACE1 ; IHS/ASDS/EFG - FACE SHEET (DEMOGRAPHIC DATA) ;  
 ;;7.1;PATIENT REGISTRATION;**11**;AUG 25,2005;Build 1
 ;IHS/OIT/NKD AG*7.1*11 MU2 MULTIPLE RACES
 ;
 W !,"BIRTHPLACE: " S DIC=2,DA=DFN,DR=.092 D ^AGDICLK I $D(AG("LKPRINT")),AG("LKPRINT")]"" W AG("LKPRINT"),", "
 S DR=.093 D ^AGDICLK W:$D(AG("LKPRINT"))&(AG("LKPRINT")]"") AG("LKPRINT")
 W !,"RELIGION: " S DR=.08 D ^AGDICLK W:$D(AG("LKPRINT")) AG("LKPRINT")
 W ?47,"TRIBE ENROLL #: " S DIC=9000001,DR=.07 D ^AGDICLK I $D(AG("LKPRINT")),AG("LKPRINT")]"" W AG("LKPRINT")
 I '$D(^AUPNPAT(DFN,43))!(AGOPT(8)'="Y") G L2
 W !,AG("-"),!,"OTHER TRIBES:",?50,"QUANTUM:"
 F AG=0:0 S AG=$O(^AUPNPAT(DFN,43,AG)) Q:+AG=0  S DIC=9000001.43,DA=DFN,AG("DRENT1")=AG,DR=.01 D ^AGDICLK I $D(AG("LKPRINT")) W !?5,AG("LKPRINT") S AG("DRENT1")=AG,DR=.02 D ^AGDICLK W:$D(AG("LKPRINT")) ?53,AG("LKPRINT")
L2 S DIC=2 W !,AG("-"),!
 ;IHS/OIT/NKD AG*7.1*11 MU2 - DISPLAY ALL RACES - START NEW CODE
 I $$GET1^DIQ(9009061,DUZ(2)_",",503,"I") D   ;CONDITIONAL DISPLAY OF RACE
 .N AGRACE,AGCNT S AGRACE=$$RACE^AGUTL(DFN)
 .Q:+AGRACE<2   ;IF LESS THAN 2, DO NOT DISPLAY (0 NO DISPLAY, 1 WILL ALREADY DISPLAY ABOVE)
 .W "RACES:"
 .F AGCNT=1:1:+AGRACE W !?5,$P(AGRACE,U,AGCNT+1)
 .W !,AG("-"),!
 ;IHS/OIT/NKD AG*7.1*11 END NEW CODE
 W "FATHER: " S DR=.2401 D ^AGDICLK W:$D(AG("LKPRINT")) AG("LKPRINT") W ?40,"BIRTHPLACE: "
 S DR=2602,DIC=9000001 D ^AGDICLK W:$D(AG("LKPRINT")) AG("LKPRINT")," "
 S DR=2603 D ^AGDICLK I $D(^DIC(5,+$G(AG("LKDATA")),0)) D
 .W $P(^DIC(5,AG("LKDATA"),0),U,2)
 W !,"MOTHER: " S DR=.2403,DIC=2 D ^AGDICLK W:$D(AG("LKPRINT")) AG("LKPRINT") W ?40,"BIRTHPLACE: "
 S DR=2605,DIC=9000001 D ^AGDICLK W:$D(AG("LKPRINT")) AG("LKPRINT")," "
 S DR=2606 D ^AGDICLK I $D(^DIC(5,+$G(AG("LKDATA")),0)) D
 .W $P(^DIC(5,AG("LKDATA"),0),U,2)
 W !,AG("-"),!,"EM CONTACT: " S DR=.331,DIC=2 D ^AGDICLK W:$D(AG("LKPRINT")) AG("LKPRINT") S DIC=9000001,DR=3102 D ^AGDICLK W:$D(AG("LKPRINT")) "  (",AG("LKPRINT"),")"
 W ?51,"EM PHONE: " S DR=.339,DIC=2 D ^AGDICLK W:$D(AG("LKPRINT")) AG("LKPRINT") W !,"EM ADDRESS:"
 S DIC=2,DR=.333 D ^AGDICLK I $D(AG("LKPRINT")),AG("LKPRINT")]"" W !?5,AG("LKPRINT")
 S AG="",DR=.336 D ^AGDICLK I $D(AG("LKPRINT")),AG("LKPRINT")]"" S AG=AG_AG("LKPRINT")_","
 F DR=.337,.338 D ^AGDICLK I $D(AG("LKPRINT")),AG("LKPRINT")]"" S AG=AG_" "_AG("LKPRINT")
 W:AG]"" !?5,AG
 G END:'$D(^DPT(DFN,.21)),END:$P(^DPT(DFN,.21),U)=""
 W !,AG("-"),!,"NEXT-OF-KIN: " S DR=.211,DIC=2 D ^AGDICLK W:$D(AG("LKPRINT")) AG("LKPRINT") S DIC=9000001,DR=2802 D ^AGDICLK W:$D(AG("LKPRINT")) "  (",AG("LKPRINT"),")"
 W ?50,"NOK PHONE: " S DR=.219,DIC=2 D ^AGDICLK W:$D(AG("LKPRINT")) AG("LKPRINT") W !,"NOK ADDRESS:"
 S DIC=2,DR=.213 D ^AGDICLK I $D(AG("LKPRINT")),AG("LKPRINT")]"" W !?5,AG("LKPRINT")
 S AG="",DR=.216 D ^AGDICLK I $D(AG("LKPRINT")),AG("LKPRINT")]"" S AG=AG_AG("LKPRINT")_","
 F DR=.217,.218 D ^AGDICLK I $D(AG("LKPRINT")),AG("LKPRINT")]"" S AG=AG_" "_AG("LKPRINT")
 W:AG]"" !?5,AG
END Q