source: WorldVistAEHR/trunk/r/SPINAL_CORD_DYSFUNCTION-SPN/SPNFEDT1.m

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

initial load of WorldVistAEHR

File size: 1.9 KB
Line 
1SPNFEDT1 ;HISC/DAD/WAA-INPUT/OUTPUT PROCESS FOR SURVEY ;10/24/2001
2 ;;2.0;Spinal Cord Dysfunction;**2,10,15,16**;01/02/1997
3 ;
4 ; This routine is to enter and edit Registry and Clinical data
5 ; for a patient. It will enter and edit data in file 154
6 ;
7PAT(SPNFTYPE,SPNFDFN) ;Enter/Edit local registry file (#154) & FIM file (#154.1)
8 ; Input:
9 ; SPNFDFN = Patient DFN in File 2
10 ; Output:
11 ; SPNFEXIT = User force exit
12 S SPNFEXIT=0
13 I '$D(^SPNL(154,SPNFDFN,0)) D Q:SPNFEXIT
14 . S X=SPNFDFN
15 . K DIC,DD,DINUM,DO S DINUM=SPNFDFN,DIC="^SPNL(154,",DIC(0)="L"
16 . S DLAYGO=154 D FILE^DICN S SPNLD0=Y I SPNLD0'>0 S SPNFEXIT=1 Q
17 . S SPNLDFN=+SPNLD0
18 . Q
19 E S SPNLD0=SPNFDFN
20 I $P(SPNLD0,U,3)=1 D
21 . N SPNTMP
22 . S SPNTMP=$$GET1^DIQ(2,SPNFDFN,57.4,"I")
23 . K DA,DIE,DR
24 . S DIE="^SPNL(154,",DA=SPNFDFN
25 . S DR=".03///SCD - CURRENTLY SERVED"
26 . S DR=DR_";.05///NOW;.06///`"_DUZ
27 . I SPNTMP'="" S:SPNTMP'=5 DR=DR_";2.6////"_SPNTMP
28 . D ^DIE
29 . Q
30 L +^SPNL(154,SPNFDFN,0):0 I '$T D Q
31 . W !!?5,"Another user is editing this record."
32 . W !?5,"Please try again later.",$C(7)
33 . Q
34 D EDIT(SPNFTYPE,SPNFDFN)
35 Q
36EDIT(SPNFTYPE,SPNFDFN) ; *** Choose add / edit a record
37 ; SPNFTYPE = 1 - Registration and Health Care Information
38 ; 2 - Functional Information
39 ; 3 - Clinical Information
40 ; SPNFDFN = DFN in PATIENT file (#2)
41 S SPNFEXIT=0
42 I SPNFTYPE=2 Q
43 D EN^SPNDIV(SPNFDFN)
44 K DA,DDSFILE,DDSPAGE,DDSPARM,DR
45 S DDSFILE="^SPNL(154,",DR="["_$P($P($T(SCREEN+SPNFTYPE),";;",2),U)_"]",DA=SPNFDFN
46 S DDSPARM="C" D ^DDS
47 K DDSPARM,DIE,DA,DR
48 S DIE="^SPNL(154,",DR=".05///NOW;.06///`"_DUZ,DA=SPNFDFN
49 D ^DIE K SPNQFL
50 L -^SPNL(154,SPNFDFN,0)
51HL7 ;added line 9-30-1998 to check and build the hl7 message
52 I $G(DDSCHANG)=1 D ;
53 .D CHK^SPNHL7(SPNFDFN)
54 .D EXIT^SPNHL7
55 ;
56SCREEN ; This is a list of what type go to what Screen Man screens.
57 ;;SPNLPFM1^1 - Registration and Health Care Information
58 ;;^2
59 ;;SPNLPFM2^3 - Clinical Information
Note: See TracBrowser for help on using the repository browser.