source: WorldVistAEHR/trunk/r/SPINAL_CORD_DYSFUNCTION-SPN/SPNFEDT3.m@ 1476

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

initial load of WorldVistAEHR

File size: 2.3 KB
Line 
1SPNFEDT3 ;HISC/DAD-INPUT/OUTPUT PROCESS FOR SURVEY (ROLL&SCROLL) ;9/25/95 09:04
2 ;;2.0;Spinal Cord Dysfunction;;01/02/1997
3 ;
4EN1 ;Enter/Edit local registry file (#154) & FIM file (#154.1)
5 S (SPNLFLAG,SPNEXIT)=0,SPNFTYPE=1
6 F D Q:SPNLFLAG=1
7 . K DIC
8 . S DIC="^SPNL(154,",DIC(0)="AELMQZ",DIC("A")="Select PATIENT: "
9 . W !! S DLAYGO=154 D ^DIC S SPNLD0=Y I SPNLD0'>0 S SPNLFLAG=1 Q
10 . I $P(SPNLD0,U,3)=1 D Q:SPNEXIT
11 .. K DR S DR=".03///SCD - CURRENTLY SERVED;.04///TRANSMIT"
12 .. D EDITREG(+SPNLD0,.DR)
13 .. Q
14 . K DR S DR=".05///NOW;.06///`"_DUZ
15 . D EDITREG(+SPNLD0,.DR) Q:SPNEXIT
16 . D ADDEDIT^SPNFEDT4(SPNFTYPE,+$P(SPNLD0,U,2)) Q:SPNEXIT
17 . ; *** reg1 ***
18 . K DR W !
19 . S DR=".03;.04;2.3;4;2.1;5.04;5.05;5.06;5.07;5.08;5.09"
20 . S DR(1,154,1)="5.1;S:X'>0 Y=""@3"";2.5;S Y=""@4"";@3;2.5///@;@4;5.11;5.12"
21 . S DR(2,154.004)=".01;.02;S:$$GET1^DIQ(154.004,DA_"",""_DA(1)_"","",.02)'[""OTHER"" Y=""@1"";.03;S Y=""@2"";@1;.03///@;@2"
22 . D EDITREG(SPNLD0,.DR) Q:SPNEXIT
23 . ; *** fim1 ***
24 . K DR S SPNEXIT=0
25 . S DR="2.08;S:X'>0 Y=""@1"";2.09;S Y=""@2"";@1;2.09///@;@2;2.06;2.07;.16;.17;.13:.15;.05:.12;2.01:2.05"
26 . D EDITFIM(SPNFD0,.DR) Q:SPNEXIT
27 . ; *** reg2 ***
28 . K DR
29 . S DR="5.03;5.02"
30 . D EDITREG(SPNLD0,.DR) Q:SPNEXIT
31 . ; *** fim2 ***
32 . K DR
33 . S DR="2.1;S:X>4 Y=""@1"";2.11;S Y=""@2"";@1;2.11///@;@2"
34 . D EDITFIM(SPNFD0,.DR) Q:SPNEXIT
35 . D CHKREC^SPNFEDT4(+SPNLD0,+SPNFD0)
36 . D SCORE^SPNFEDT2(+SPNFD0)
37 . Q
38EXIT ; *** Clean-up & Quit
39 K D,DA,DD,DIC,DIE,DINUM,DIR,DIRUT,DLAYGO,DO,DR,DTOUT,DUOUT
40 K SPNEXIT,SPNFACTN,SPNFD0,SPNFDFN,SPNFFLAG,SPNFTYPE,SPNLD0,SPNLFLAG
41 Q
42 ;
43EDITREG(SPNLD0,DR) ; *** Edit a record in SCD file (#154)
44 ; SPNLD0 = IEN in SCD file (#154)
45 ; DR = DR string of fields to edit
46 L +^SPNL(154,+SPNLD0,0):0 I '$T D Q
47 . W !!?5,"Another user is editing this record."
48 . W !?5,"Please try again later.",$C(7)
49 . S SPNEXIT=1
50 . Q
51 K DA,DIE
52 S DIE="^SPNL(154,",DA=+SPNLD0
53 D ^DIE S SPNEXIT=($D(Y)>0)
54 L -^SPNL(154,SPNLD0,0)
55 Q
56 ;
57EDITFIM(SPNFD0,DR) ; *** Edit a record in the FIM file (#154.1)
58 ; SPNfD0 = IEN in FIM file (#154.1)
59 ; DR = DR string of fields to edit
60 I $P($G(^SPNL(154.1,+SPNFD0,0)),U)'>0 Q
61 L +^SPNL(154.1,SPNFD0):0 I '$T D Q
62 . W !!?5,"Another user is editing this record."
63 . W !?5,"Please try again later.",$C(7)
64 . S SPNEXIT=1
65 . Q
66 K DA,DIE
67 S DIE="^SPNL(154.1,",DA=SPNFD0
68 D ^DIE S SPNEXIT=($D(Y)>0)
69 L -^SPNL(154.1,SPNFD0)
70 Q
Note: See TracBrowser for help on using the repository browser.