source: FOIAVistA/trunk/r/IMAGING-MAG-ZMAG/MAGDCCS3.m@ 1535

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

initial load of FOIAVistA 6/30/08 version

File size: 2.2 KB
Line 
1MAGDCCS3 ;WOIFO/MLH - DICOM Correct - Clinical specialties - subroutines ; 14 Jul 2003 11:24 AM
2 ;;3.0;IMAGING;**10,11**;14-April-2004
3 ;; +---------------------------------------------------------------+
4 ;; | Property of the US Government. |
5 ;; | No permission to copy or redistribute this software is given. |
6 ;; | Use of unreleased versions of this software requires the user |
7 ;; | to execute a written test agreement with the VistA Imaging |
8 ;; | Development Office of the Department of Veterans Affairs, |
9 ;; | telephone (301) 734-0100. |
10 ;; | |
11 ;; | The Food and Drug Administration classifies this software as |
12 ;; | a medical device. As such, it may not be changed in any way. |
13 ;; | Modifications to this software may result in an adulterated |
14 ;; | medical device under 21CFR820, the use of which is considered |
15 ;; | to be a violation of US Federal Statutes. |
16 ;; +---------------------------------------------------------------+
17 ;;
18 Q
19ASK() ;Prompt user
20 N DIR,X,Y
21 S DIR(0)="F:1:30",DIR("A")="Enter patient or request/consultation number"
22 S DIR("?")="Enter a patient name or request/consultation number to associate with this image."
23 D ^DIR
24 Q Y
25READ(RESULT) ; Accept input for patient or request/consultation number.
26 ; We'll return patient DFN^NAME, or DFN~REQNO.
27 N ANS
28 S RESULT=0,ANS=$$ASK
29 I ANS=""!(ANS="^") S RESULT="^" Q RESULT
30 ;Is user trying to select on request/consult # or by patient?
31 I ANS?1.8N D REQCON(ANS,.RESULT) I +RESULT Q RESULT ; request/consult #
32 D:ANS'?.N1"-".E PAT(ANS,.RESULT) ; patient
33 Q RESULT
34REQCON(GMRIEN,RESULT) ; Validate existence of user-entered request/consultation number.
35 ;
36 S RESULT=$$GET1^DIQ(123,GMRIEN,.02,"I") ; get the patient's DFN value
37 I RESULT'="" S RESULT=RESULT_"~"_GMRIEN
38 Q
39PAT(PAT,RESULT) ; Verify that patient exists and has requests/consults on file.
40 N DIR,X,Y
41 S DIR(0)="P^2:EMZ",DIR("B")=PAT
42 D ^DIR
43 I Y D
44 . W !,"Y=",Y,! ; ***<<< DEBUG
45 . I $$ANYREQ^MAGDGMRC(+Y) S RESULT=Y
46 . E W !,"No requests/consultations on file for this patient.",!
47 . Q
48 Q
Note: See TracBrowser for help on using the repository browser.