source: FOIAVistA/trunk/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBCNSJ11.m@ 677

Last change on this file since 677 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 3.9 KB
Line 
1IBCNSJ11 ;ALB/CPM - INACTIVATE AN INSURANCE PLAN (CON'T) ; 18-JAN-95
2 ;;Version 2.0 ; INTEGRATED BILLING ;**28,62**; 21-MAR-94
3 ;;Per VHA Directive 10-93-142, this routine should not be modified.
4 ;
5NOTACT ; Handle plans which have already been inactivated.
6 ; Required variable input:
7 ; IBCNS -- Pointer to company in file #36 offering the plan
8 ; IBPLAN -- Pointer to the plan in file #355.3
9 ; IBSUB -- Flagged high if there are any plan subscriptions
10 ;
11 N DFN,IBQUIT,IBSUB1,Y
12 W !,"This plan has already been inactivated!"
13 S DIR(0)="Y",DIR("A")="Do you wish to reactivate this plan",DIR("?")="To reactivate this plan, answer 'YES.' Otherwise, answer 'NO.'"
14 W ! D ^DIR K DIR,DIRUT,DTOUT,DUOUT,DIROUT
15 I 'Y,IBSUB W !,"There are still subscribers to this plan. The plan cannot be deleted." G NOTACTQ
16 I 'Y D DEL(IBPLAN) G NOTACTQ
17 ;
18 ; - note that insurance policies will be activated
19 I IBSUB S IBQUIT=0 D I IBQUIT G NOTACTQ
20 .W !!,"There are still subscribers to this plan! Reactivating the plan will activate"
21 .W !,"the policies of these subscribers."
22 .S DIR(0)="Y",DIR("A")=" Is it okay to continue",DIR("?")="Answer 'YES' to reactivate this plan. Otherwise, answer 'NO.'"
23 .W ! D ^DIR K DIR,DIRUT,DTOUT,DUOUT,DIROUT I 'Y W !,"The plan was not reactivated." S IBQUIT=1 Q
24 ;
25 ; - reactivate the plan
26 W !,"Reactivating the plan... " D IRACT^IBCNSJ(IBPLAN,0) W "done."
27 I 'IBSUB W !,"Please note there are no subscribers to this plan." G NOTACTQ
28 W !,"Updating the 'Covered by Insurance?' field for all plan subscribers... "
29 K ^TMP($J,"IBSUBS")
30 S IBSUB1=$$SUBS^IBCNSJ(IBCNS,IBPLAN,0,"^TMP($J,""IBSUBS"")")
31 S DFN=0 F S DFN=$O(^TMP($J,"IBSUBS",DFN)) Q:'DFN D COV^IBCNSJ(DFN)
32 W "done." K ^TMP($J,"IBSUBS")
33NOTACTQ Q
34 ;
35 ;
36DEL(IBPLAN) ; Want to delete an Insurance Plan?
37 ; Input: IBPLAN -- Pointer to the plan in file #355.3
38 N DIR,DIRUT,DTOUT,DUOUT,DIROUT,X,Y
39 S DIR(0)="Y",DIR("A")="There are no subscribers to this plan. Would you like to delete it",DIR("?")="If you wish to delete this inactive plan, answer 'YES.' Otherwise, answer 'NO.'"
40 W ! D ^DIR I 'Y W !,"The plan was not deleted."
41 I Y W !,"Deleting the plan... " D DEL^IBCNSJ(IBPLAN) W "done."
42 Q
43 ;
44 ;
45HLRP ; Reader help for repointing policies to a new plan.
46 W !!,"If you wish to change the subscribed-to plan of ALL policies which are"
47 W !,"currently associated with this plan, enter 'YES.' Otherwise, enter 'NO.'"
48 W !!,"You may only repoint all policies to a single plan. If you enter 'NO,'"
49 W !,"you will receive a mailman message of all the inactivated policies which"
50 W !,"will result from inactivating the plan, and then you may use the 'Change"
51 W !,"Policy Plan' action to change the subscribed-to plan on an individual basis."
52 Q
53 ;
54MAIL ; Note that the subscription list will be mailed to the user.
55 S IBMAIL=1
56 W !,"The policies will not be re-pointed. You will receive a mail message of"
57 W !,"all the subscribers to this plan if you choose to inactivate it."
58 Q
59 ;
60REP(IBCNS,IBNEWP,IBOLDP) ; Repoint patient policies from old to new plan
61 ; Input: IBCNS -- Pointer to the company in file #36 which
62 ; offers the plans
63 ; IBNEWP -- Pointer to the new plan in file #355.3
64 ; IBOLDP -- Pointer to the old plan in file #355.3
65 ;
66 I '$G(IBCNS)!'$G(IBNEWP)!'$G(IBOLDP) G REPQ
67 N DA,DFN,DIE,DR,IBCDFN
68 S DFN=0 F S DFN=$O(^DPT("AB",IBCNS,DFN)) Q:'DFN D
69 .S IBCDFN=0 F S IBCDFN=$O(^DPT("AB",IBCNS,DFN,IBCDFN)) Q:'IBCDFN D
70 ..Q:$P($G(^DPT(DFN,.312,IBCDFN,0)),"^",18)'=IBOLDP
71 ..S DA=IBCDFN,DA(1)=DFN,DIE="^DPT("_DFN_",.312,",DR=".18////"_IBNEWP
72 ..D ^DIE
73REPQ Q
74 ;
75DELP ; Delete the newly-added plan.
76 I $G(IBNEWP) W !,"Deleting the newly-added plan... " D DEL^IBCNSJ(IBCPOL) W "done."
77 Q
78 ;
79HLMT ; Reader help for merging transferrable benefits used.
80 W !!,"If you want to merge the patient's current benefits used into the"
81 W !,"newly-proposed plan, enter 'YES'. Otherwise, enter 'NO' and these"
82 W !,"benefits used will be deleted."
83 Q
Note: See TracBrowser for help on using the repository browser.