source: WorldVistAEHR/trunk/r/REGISTRATION-DGQE-DG-DPT-GRPX-VAD-VAF-VAS-VAT-VAU--VA-VIC--DGBT--DGJ--DGYA--VALM/DGPT101.m@ 701

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

initial load of WorldVistAEHR

File size: 2.9 KB
RevLine 
[613]1DGPT101 ;ALB/MTC - 101/701 Austin Edit Checks ; 12 NOV 92
2 ;;5.3;Registration;**8,164,180,247,415,678,696**;Aug 13, 1993
3 ;
4EN ;
5 S (DGPTFEF,DGPTERC)=0
6101 ;-- process 101+701 data
7 N ERROR
8 ;
9PARSE ;Set up record string, Call routine to parse record
10 S DGPTSTR=^TMP("AEDIT",$J,NODE,SEQ)
11 D SET^DGPT101P
12 D NOW^%DTC S DGPTTY=(17+$E(X,1))_$E(X,2,3)
13701 ;PROCESS 701
14 S DGPTAL7=$O(^TMP("AEDIT",$J,"N701",SEQ)) I DGPTAL7="" S DGPTFEF=1 Q
15 D SET^DGPT701 I DGPTFEF Q
16SET ; Start error piece, flags
17 S DGPTEDFL=0,DGPTSTR=^TMP("AEDIT",$J,NODE,SEQ)
18SSN ; Start edits
19 I DGPTSSN'?9N!((DGPTPS=" ")&("9"[$E(DGPTSSN))) S DGPTERC=102 D ERR G:DGPTEDFL EXIT
20 I " P"'[DGPTPS S DGPTERC=101 D ERR G:DGPTEDFL EXIT
21 S DGPTPS=$S(DGPTPS="P":DGPTPS,1:"A")
22PSEU ;
23 I DGPTPS="P" S DGPTERC=0 D PSE^DGPTAE01 I DGPTERC D ERR G:DGPTEDFL EXIT
24DTE ;
25 S X=DGPTDTS,%DT="XT" D ^%DT I Y<0 S DGPTERC=103 D ERR G:DGPTEDFL EXIT
26 I Y>0 D DD^%DT S DGPTADT=$E(Y,5,6)_"-"_$E(Y,1,3)_"-"_$E(Y,9,12)_" "_$S($P(Y,"@",2)]"":$E($P(Y,"@",2),1,5),1:"00:00")
27 S X1=DGPTNOW,X2=$$FMDT($E(DGPTSTR,15,20)) D ^%DTC I X<0 S DGPTERC=140 D ERR G:DGPTEDFL EXIT
28 S DGPTDTS=$$FMDT($E(DGPTSTR,15,20))_"."_$E(DGPTSTR,21,24)
29LN ;
30 I DGPTLN'?1.U." " S DGPTERC=105 D ERR G:DGPTEDFL EXIT
31 I DGPTFI'?.U&(DGPTFI'=" ")!((DGPTMI'?1U)&(DGPTMI'=" ")) S DGPTERC=106 D ERR G:DGPTEDFL EXIT
32SRA ;-- may need to add more edits later
33 D ^DGPT10S1 I DGPTERC D ERR G:DGPTEDFL EXIT
34SRP ;
35 N I
36 S DGPTERC=0
37 I " 1234"'[DGPTSRP S DGPTERC=109 D ERR G:DGPTEDFL EXIT G POW
38 I "1234"[DGPTSRP S DGPTERC=109 F I=20:1:26 I DGPTSTTY[U_I_U S DGPTERC=0 Q
39 I DGPTERC D ERR G:DGPTEDFL EXIT
40POW ;
41 I $L(DGPTPOW)'=1!("123456789AB "'[DGPTPOW) S DGPTERC=110 D ERR G:DGPTEDFL EXIT
42MAR ;
43 I "MWDUSN"'[DGPTMRS S DGPTERC=111 D ERR G:DGPTEDFL EXIT
44GEN ;
45 I "FM"'[DGPTGEN S DGPTERC=112 D ERR G:DGPTEDFL EXIT
46 S DGPTGEN1=$S(DGPTGEN="F":1,1:0)
47DOB ;
48 S DGPTERC=0 D DB^DGPTAE01 I DGPTERC D ERR G:DGPTEDFL EXIT
49POS ;
50 S DGPTERC=0 D ^DGPT10CB I DGPTERC D ERR G:DGPTEDFL EXIT
51EXP ;
52 S DGPTERC=0 D AGO^DGPTAE01 I DGPTERC D ERR G:DGPTEDFL EXIT
53 S DGPTERC=0 D IRAD^DGPTAE01 I DGPTERC D ERR G:DGPTEDFL EXIT
54HOME ;
55 S DGPTERC=0 D STATE^DGPTAE01 I DGPTERC D ERR G:DGPTEDFL EXIT
56 S DGPTERC=0 D CNTY^DGPTAE01 I DGPTERC D ERR G:DGPTEDFL EXIT
57 S DGPTERC=0 D ZIP^DGPTAE01 I DGPTERC D ERR G:DGPTEDFL EXIT
58MT ;
59 S DGPTERC=0 D MT^DGPTAE01 I DGPTERC D ERR G:DGPTEDFL EXIT
60ERI ;
61 S DGPTERC=0 I ("^K^"'[(U_DGPTERI_U))&(DGPTERI'=" ") S DGPTERC=125 D ERR G:DGPTEDFL EXIT
62INCOM ;
63 I DGPTDDS<2911001 G GOOD
64 S DGPTERC=0 D INC^DGPTAE01 I DGPTERC D ERR G:DGPTEDFL EXIT
65GOOD ;
66 W:'$D(ERROR) "."
67 ;
68EXIT ;
69 K DGPTREC,DGPTORBD,DGPTLN,DGPTFI,DGPTMI,DGPTMRS,DGPTSTE,DGPTCTY,DGPTZIP,DGPTINC
70 K DGPTSRA,DGPTTF,DGPTSRP,DGPTPOS1,DGPTEXA,DGPTEXI,DGPTMTC,DGPTDTD,DGPTDSP,DGPTDTY,DGPTDOP,DGPTDVA,DGPTDPD,DGPTDRF,DGPTDAS,DGPTDCP,DGPTDDXE,DGPTDDXO,DGPTDLR,DGPTDLC,DGPTDSC,DGPTDAGE,DGPTDRG,DGPTSTR
71 K DGPT70LG,DGPT70SU,DGPT70DR,DGPT70X4,DGPTDXV1,DGPTDXV2
72 Q
73ERR ;
74 D WRTERR^DGPTAE(DGPTERC,NODE,SEQ)
75 S ERROR=1
76 Q
77FMDT(X) ; change to fm date for y2k
78 N Y
79 D ^%DT
80 Q Y
Note: See TracBrowser for help on using the repository browser.