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

AG7.m

Go to the documentation of this file.
  1. AG7 ; IHS/ASDS/EFG - ENTER PRIVATE INSURANCE DATA ;
  1. ;;7.1;PATIENT REGISTRATION;**1,2,3,12**;AUG 25, 2005;Build 1
  1. ;
  1. ;IHS/OIT/NKD AG*7.1*12 INSURER TYPE
  1. ;
  1. L1 K AGADD
  1. I AGOPT(5)'="Y" G ^AG8
  1. S AG("DFLT")=$S($D(^AUPNPRVT(DFN,0)):"YES",1:"NO")
  1. W !!
  1. W "Does this patient have PRIVATE INSURANCE COVERAGE? (Y/N) "
  1. W AG("DFLT"),"// "
  1. D READ^AG
  1. S AG("LT")=$S($E(Y)="Y":"YES",1:"NO")
  1. ;TESTING USE OF EDIT SCREEN FOR ADDING INSURANCE TO NEW PATIENT 5/13/2005
  1. ;I $G(^AGFAC(DUZ(2),"NEWADDINS")) I AG("LT")="YES" S AGPAT=$P($G(^DPT(DFN,0)),U) S AGXTERN=1 D ^AGED7 K AGXTERN G:$G(NEWENTRY)=0 ^AG8 G L1
  1. ;I $G(^AGFAC(DUZ(2),"NEWADDINS")),$D(DUOUT) G DUOUT^AG6
  1. ;I $G(^AGFAC(DUZ(2),"NEWADDINS")),($G(AG("LT"))="NO") G ^AG8
  1. ;TESTING
  1. ;IHS/SD/TPF AG*7.1*1 9/22/2005
  1. ;I AG("LT")="YES" D ADDINS(DFN) G L1
  1. I AG("LT")="YES" D ADDINS(DFN) G ^AG8 ;AG*7.1*4 IM???? REPORTED BY THELMA
  1. ;END AG*7.1*1
  1. Q:$D(DTOUT)!$D(DFOUT)
  1. G DUOUT^AG6:$D(DUOUT)
  1. G L2:Y["Y",END1:Y["N"!($D(DLOUT)&(AG("DFLT")="NO")),L2:$D(DLOUT)&(AG("DFLT")="YES") D YN^AG G L1
  1. ADDCOV ;EP - Add New Insurance.
  1. L2 S AGELP("PDFN")=DFN
  1. S AGELP("TYPE")="PI"
  1. S:$D(AGCHRT) AGELP("HRN")=AGCHRT
  1. D INS^AGEL
  1. L16 ;
  1. END Q:$D(AG("EDIT"))
  1. I $G(AGADDINS)="A" K AG G ^AGED4A
  1. K AG
  1. G ^AG8
  1. END1 G END:'$D(^AUPNPRVT(DFN,0))
  1. DUOUT ;EP
  1. G L1:AGOPT(5)="Y",DUOUT^AG6
  1. Q
  1. ;NEW CODE AG*7.1*1 IHS/SD/TPF 9/22/2005
  1. ADDINS(ID0) ;EP - ADD PRVT INS. USING NEW EDIT SCREENS
  1. AGAIN ;EP
  1. K DIC,DIE,DA,DIR,DR,ADDCHK,AGNEWINS
  1. S DIC="^AUTNINS("
  1. S DIC(0)="AEMQZ"
  1. ;S DIC("S")="I $P($G(^(1)),U,7)'=0,($P($G(^(2)),U)=""P"")"
  1. S DIC("S")="I $P($G(^(1)),U,7)'=0,$$INSTYP^AGUTL(Y)=""P""" ;IHS/OIT/NKD AG*7.1*12
  1. D ^DIC
  1. K DIC,DIE,DA,DIR,DR
  1. I +Y<1 W !!,"Must enter an existing private insurer" H 2 G AGAIN
  1. S INSPTR=+Y
  1. D EN^AGEDPRV(ID0,.ID1,1,"",INSPTR,.POLHPTR,.COVPTR)
  1. K NEWENTRY,AGSELECT
  1. Q:$G(Y)=AGOPT("ESCAPE")
  1. I '$O(^AUPNPRVT(ID0,11,0)) Q
  1. D:$G(INSPTR)'=""&('$D(AGKIDS))&($G(POLHPTR)'="")&($G(COVPTR)'="") EN^AGEDPRVB(ID0,ID1,1,"",$G(INSPTR),$G(POLHPTR),$G(COVPTR))
  1. Q