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

ABMDTGAS.m

Go to the documentation of this file.
  1. ABMDTGAS ; IHS/ASDST/DMJ - Remap Group Names for an Employer ;
  1. ;;2.6;IHS 3P BILLING SYSTEM;;NOV 12, 2009
  1. ;;
  1. ; this enables the mass changes of group names for all
  1. ; policies associated with one employer
  1. ; select Employer to remap
  1. ; select New Group name
  1. ; scan all policies for that employer and change the group name
  1. ; to the one selected
  1. S ;
  1. W !!,"This utility allows for the mass assignment of a specified Group Plan to the",!,"policies of each employee for a selected Employer.",!
  1. K DIR S DIR(0)="Y",DIR("A")="Do you wish to run this utility program"
  1. D ^DIR Q:'$G(Y)
  1. SEL W ! K DIC S DIC="^AUTNEMPL(",DIC(0)="AEQMZ" D ^DIC I Y'>0 W !,"NONE SELECTED EXITING OPTION",!,*7 H 3 G XIT ;--->
  1. S ABMEMP=+Y,ABMEMPNM=Y(0,0)
  1. W ! K DIC S DIC="^AUTNEGRP(",DIC("A")="Select GROUP PLAN: ",DIC(0)="AEQMZ" D ^DIC I Y'>0 W *7 G END ;--->
  1. S ABMGRP=+Y,ABMGRPNM=Y(0,0)
  1. W !!,"You have selected to assign all employees of: ",ABMEMPNM
  1. W !?29," the Group Plan: ",ABMGRPNM
  1. W ! K DIR S DIR(0)="Y",DIR("A")="Is this Correct (Y/N)" D ^DIR G XIT:$D(DIRUT)!$D(DIROUT),END:Y=0 ;--->
  1. ;
  1. SCAN1 ;EP scan "AE" of policy holder file
  1. S ABMDA=0,DIE="^AUPN3PPH(",DR=".06////"_ABMGRP
  1. F ABMC1=0:1 S ABMDA=$O(^AUPN3PPH("AE",ABMEMP,ABMDA)) Q:'ABMDA D Q:$D(ABM("DIE-FAIL"))
  1. .I '$D(ZTQUEUED),(ABMC1#100) W "."
  1. .S DA=ABMDA D ^ABMDDIE
  1. ;
  1. SCAN2 ;EP scan the patient file to pick up those policies that have
  1. ;registration links (the employer pointer is not stored in the Policy file
  1. S ABMDFN=0,DIE="^AUPN3PPH(",DR=".06////"_ABMGRP,ABMC3=0
  1. I $D(^AUPNPAT("AF",ABMEMP)) F ABMC2=0:1 S ABMDFN=$O(^AUPNPAT("AF",ABMEMP,ABMDFN)) Q:'ABMDFN D Q:$D(ABM("DIE-FAIL"))
  1. .I '$D(ZTQUEUED),(ABMC2#100) W "."
  1. .I $D(^AUPN3PPH("C",ABMDFN)) S DA=$O(^(ABMDFN,0)) D ^ABMDDIE S ABMC3=ABMC3+1
  1. ;
  1. I '$D(ZTQUEUED) W !!,?10,"POLICIES CHANGED: ",ABMC1+ABMC3,!
  1. END ;EP
  1. W !
  1. K DIR S DIR(0)="YO",DIR("A")="Do you wish to Select another Employer" D ^DIR I Y=1 G SEL
  1. XIT K ABMEMP,ABMEMPNM,ABMGRP,ABMGRPNM,ABMC1,ABMC2,ABMC3,ABMDA,ABMDFN,DA
  1. Q