source: WorldVistAEHR/trunk/r/INTERIM_MANAGEMENT_SUPPORT-ECT/ECTPSRV.m@ 1154

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

initial load of WorldVistAEHR

File size: 2.8 KB
Line 
1ECTPSRV ;B'ham ISC/PTD-Identify Local Services from National File ;01/29/91 08:00
2V ;;1.05;INTERIM MANAGEMENT SUPPORT;**3**;
3 ;SELECT ENTER/EDIT CHOICE
4CHS W !!,"At this time, you may:",!!,"1. Enter/Edit Station's Services",!,"2. List 'National' Services",!,"3. List Identified Local Services",!,"4. Edit a Single Service"
5 W !,"5. Add OPC to National Service File",!!,"Select a number (1 - 5): "
6 R CHS:DTIME G:'$T!("^"[CHS) EXIT I CHS'?1N!(CHS<1)!(CHS>5) W !!,*7,"You MUST answer with a number between 1 and 5." G CHS
7 ;BRANCH BASED ON ENTER/EDIT CHOICE
8 I (CHS=2)!(CHS=3) D DIP G EXIT
9 I CHS=4 D DIC G EXIT
10 I CHS=5 D OPC G EXIT
11LOC W !!,"If your station has the following SERVICE,",!,"respond with a ""Y"". If you DO NOT HAVE the service,",!,"respond with a ""N"" or press <RETURN>.",!!
12 S RESP="" F SRDA=0:0 S SRDA=$O(^ECC(730,SRDA)) Q:'SRDA!(RESP="^") S SRNM=$P(^ECC(730,SRDA,0),"^") D LOOP
13EXIT K %,%Y,BY,CHS,D,D0,DA,DHD,DIC,DIE,DIR,DR,DTOUT,DUOUT,FLDS,FR,I,L,OPC,P,RESP,SRDA,SRNM,TO,X,Y
14 Q
15 ;
16DIP S DIC="^ECC(730,",L=0,BY=".01",(FR,TO)="" S FLDS=$S(CHS=3:".01;""NATIONAL SERVICE"",2",1:".01,1"),DHD=$S(CHS=3:"LOCAL SERVICE LIST",1:"NATIONAL SERVICE LIST")
17 D EN1^DIP
18 Q
19 ;
20LOOP S (DIC,DIE)="^ECC(730,",DIC(0)="M",X=SRNM D ^DIC K DIC S DA=+Y W !!,SRNM S DR="2" D ^DIE K DIE I $D(Y) S RESP="^"
21 Q
22 ;
23DIC S (DIC,DIE)="^ECC(730,",DIC(0)="QEAM",DIC("A")="Select NATIONAL service: " D ^DIC Q:Y<0 S DA=+Y,DR="2" D ^DIE K DIE
24 Q
25 ;
26OPC W *7,!!?30,"* * W A R N I N G * *",!?20,"Use this functionality with caution!",!?20,"Add the Outpatient Clinic names for which",!?20,"you wish to track management data."
27 W ! S DIR(0)="Y",DIR("A")="Are you SURE you wish to continue",DIR("B")="NO",DIR("?")="Enter 'Y' or 'YES' to continue; press <RETURN> to exit." D ^DIR
28 Q:$D(DTOUT) Q:$D(DUOUT) Q:Y=0
29 W !!,"Name must be 3-35 characters in length,",!,"must not begin with punctuation,",!,"and must be all upper case."
30ASK K OPC R !!,"Enter OUTPATIENT CLINIC name: ",OPC:DTIME Q:'$T!("^"[OPC) I $L(OPC)>35!($L(OPC)<3)!'(OPC'?1P.E)!(OPC?.E1L.E) W *7,!,"Answer must be 3-35 upper case characters; not beginning with punctuation." G ASK
31 I $D(^ECC(730,"B",OPC)) W *7,!!,OPC," is already in the file!" G ASK
32 W !!,"This is the ONLY opportunity you will be given to verify the name.",!,"Please check for correct spelling and accuracy.",!!,"OUTPATIENT CLINIC name: ",OPC,!
33 S DIR(0)="Y",DIR("A")="Are you SURE name is correct",DIR("B")="NO",DIR("?")="Enter 'Y' or 'YES' if name is correct; press <RETURN> to re-enter name." D ^DIR
34 Q:$D(DTOUT) Q:$D(DUOUT) G:Y=0 ASK
35 L ^ECC(730) F I=1000:1 Q:'$D(^ECC(730,I,0))
36 S ^ECC(730,I,0)=OPC_"^^1",^ECC(730,"B",($E(OPC,1,30)),I)="",$P(^ECC(730,0),"^",3)=I,$P(^ECC(730,0),"^",4)=$P(^ECC(730,0),"^",4)+1,^ECC(730,"ALS",I)="" L
37 W *7,!!,OPC," has been ADDED to National Service File!",!! G ASK
Note: See TracBrowser for help on using the repository browser.