source: FOIAVistA/trunk/r/SCHEDULING-SD-SC/SCMSVZSP.m@ 1458

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

initial load of FOIAVistA 6/30/08 version

File size: 1.4 KB
Line 
1SCMSVZSP ;ALB/ESD HL7 ZSP Segment Validation ;05/08/95
2 ;;5.3;Scheduling;**44,66**;Aug 13, 1993
3 ;
4 ;
5EN(ZSPSEG,HLQ,HLFS,VALERR,DFN) ;
6 ; Entry point to return the HL7 ZSP (Service Period) validation segment
7 ;
8 ; Input: ZSPSEG - ZSP Segment
9 ; HLQ - HL7 null variable
10 ; HLFS - HL7 field separator
11 ; VALERR - The array to put errors in
12 ; DFN - The paitent file DFN
13 ;
14 ; Output: 1 if ZSP passed validity check
15 ; Error message if ZSP failed validity check in form of:
16 ; -1^"xxx failed validity check" (xxx=element in ZSP segment)
17 ;
18 ;
19 N I,MSG,X,DATA,CNT,SEG
20 S MSG="-1^Element in ZSP segment failed validity check"
21 S ZSPSEG=$G(ZSPSEG),CNT=1,SEG="ZSP"
22 D VALIDATE^SCMSVUT0(SEG,ZSPSEG,"0014",VALERR,.CNT)
23 I $D(@VALERR@(SEG)) G ENQ
24 ;
25 ;- Convert HLQ to null
26 S ZSPSEG=$$CONVERT^SCMSVUT0(ZSPSEG,HLFS,HLQ)
27 ;
28 ;- Validate data elements
29 F I=1,3,4,5,51,6,61 D
30 . S DATA=$P(ZSPSEG,HLFS,+$E(I,1,1))
31 . D VALIDATE^SCMSVUT0(SEG,DATA,$P($T(@(I)),";",3),VALERR,.CNT)
32 . Q
33 ;
34ENQ Q $S($D(@VALERR@(SEG)):MSG,1:1)
35 ;
36 ;
37ERR ;;Invalid or missing patient service period data for encounter (HL7 ZSP segment)
38 ;
39 ;- ZSP data elements validated
40 ;
411 ;;0035;HL7 SEGMENT NAME
423 ;;B000;Service connected
434 ;;B050;SERVICE CONNECTED PERCENTAGE
445 ;;B100;PERIOD OF SERVICE CODE
4551 ;;B120;Period of Serivce (active)
466 ;;B150;VIETNAM SERVICE INDICATED?
4761 ;;B170;Vietnam serive indicated incon. vet status
Note: See TracBrowser for help on using the repository browser.