-
Notifications
You must be signed in to change notification settings - Fork 84
/
Copy pathDG_53_P841.KID
7012 lines (6944 loc) · 205 KB
/
DG_53_P841.KID
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
KIDS Distribution saved on Aug 09, 2011@15:48:36
PUBLIC LAW 3.6 (8/9/11)
**KIDS**:DG*5.3*841^IB*2.0*454^
**INSTALL NAME**
DG*5.3*841
"BLD",8189,0)
DG*5.3*841^REGISTRATION^0^3110809^y
"BLD",8189,4,0)
^9.64PA^^
"BLD",8189,6)
1^
"BLD",8189,6.3)
7
"BLD",8189,"KRN",0)
^9.67PA^779.2^20
"BLD",8189,"KRN",.4,0)
.4
"BLD",8189,"KRN",.401,0)
.401
"BLD",8189,"KRN",.402,0)
.402
"BLD",8189,"KRN",.403,0)
.403
"BLD",8189,"KRN",.5,0)
.5
"BLD",8189,"KRN",.84,0)
.84
"BLD",8189,"KRN",3.6,0)
3.6
"BLD",8189,"KRN",3.8,0)
3.8
"BLD",8189,"KRN",9.2,0)
9.2
"BLD",8189,"KRN",9.8,0)
9.8
"BLD",8189,"KRN",9.8,"NM",0)
^9.68A^13^13
"BLD",8189,"KRN",9.8,"NM",1,0)
DGENA^^0^B20613434
"BLD",8189,"KRN",9.8,"NM",2,0)
DGENELA^^0^B27857025
"BLD",8189,"KRN",9.8,"NM",3,0)
DGENELA1^^0^B78071004
"BLD",8189,"KRN",9.8,"NM",4,0)
DGENPTA^^0^B40976431
"BLD",8189,"KRN",9.8,"NM",5,0)
DGENPTA1^^0^B22181053
"BLD",8189,"KRN",9.8,"NM",6,0)
DGENU^^0^B44311306
"BLD",8189,"KRN",9.8,"NM",7,0)
DGENUPL3^^0^B75053019
"BLD",8189,"KRN",9.8,"NM",8,0)
DGENA1A^^0^B15415989
"BLD",8189,"KRN",9.8,"NM",9,0)
DGENELA4^^0^B69534652
"BLD",8189,"KRN",9.8,"NM",10,0)
DGENUPL4^^0^B67002910
"BLD",8189,"KRN",9.8,"NM",11,0)
DGRP6^^0^B15906836
"BLD",8189,"KRN",9.8,"NM",12,0)
DGENL1^^0^B69443276
"BLD",8189,"KRN",9.8,"NM",13,0)
DGMTR^^0^B68219377
"BLD",8189,"KRN",9.8,"NM","B","DGENA",1)
"BLD",8189,"KRN",9.8,"NM","B","DGENA1A",8)
"BLD",8189,"KRN",9.8,"NM","B","DGENELA",2)
"BLD",8189,"KRN",9.8,"NM","B","DGENELA1",3)
"BLD",8189,"KRN",9.8,"NM","B","DGENELA4",9)
"BLD",8189,"KRN",9.8,"NM","B","DGENL1",12)
"BLD",8189,"KRN",9.8,"NM","B","DGENPTA",4)
"BLD",8189,"KRN",9.8,"NM","B","DGENPTA1",5)
"BLD",8189,"KRN",9.8,"NM","B","DGENU",6)
"BLD",8189,"KRN",9.8,"NM","B","DGENUPL3",7)
"BLD",8189,"KRN",9.8,"NM","B","DGENUPL4",10)
"BLD",8189,"KRN",9.8,"NM","B","DGMTR",13)
"BLD",8189,"KRN",9.8,"NM","B","DGRP6",11)
"BLD",8189,"KRN",19,0)
19
"BLD",8189,"KRN",19.1,0)
19.1
"BLD",8189,"KRN",101,0)
101
"BLD",8189,"KRN",409.61,0)
409.61
"BLD",8189,"KRN",771,0)
771
"BLD",8189,"KRN",779.2,0)
779.2
"BLD",8189,"KRN",870,0)
870
"BLD",8189,"KRN",8989.51,0)
8989.51
"BLD",8189,"KRN",8989.52,0)
8989.52
"BLD",8189,"KRN",8994,0)
8994
"BLD",8189,"KRN","B",.4,.4)
"BLD",8189,"KRN","B",.401,.401)
"BLD",8189,"KRN","B",.402,.402)
"BLD",8189,"KRN","B",.403,.403)
"BLD",8189,"KRN","B",.5,.5)
"BLD",8189,"KRN","B",.84,.84)
"BLD",8189,"KRN","B",3.6,3.6)
"BLD",8189,"KRN","B",3.8,3.8)
"BLD",8189,"KRN","B",9.2,9.2)
"BLD",8189,"KRN","B",9.8,9.8)
"BLD",8189,"KRN","B",19,19)
"BLD",8189,"KRN","B",19.1,19.1)
"BLD",8189,"KRN","B",101,101)
"BLD",8189,"KRN","B",409.61,409.61)
"BLD",8189,"KRN","B",771,771)
"BLD",8189,"KRN","B",779.2,779.2)
"BLD",8189,"KRN","B",870,870)
"BLD",8189,"KRN","B",8989.51,8989.51)
"BLD",8189,"KRN","B",8989.52,8989.52)
"BLD",8189,"KRN","B",8994,8994)
"BLD",8189,"QUES",0)
^9.62^^
"BLD",8189,"REQB",0)
^9.611^9^5
"BLD",8189,"REQB",1,0)
DG*5.3*688^2
"BLD",8189,"REQB",6,0)
DG*5.3*840^2
"BLD",8189,"REQB",7,0)
DG*5.3*797^2
"BLD",8189,"REQB",8,0)
DG*5.3*754^2
"BLD",8189,"REQB",9,0)
DG*5.3*838^2
"BLD",8189,"REQB","B","DG*5.3*688",1)
"BLD",8189,"REQB","B","DG*5.3*754",8)
"BLD",8189,"REQB","B","DG*5.3*797",7)
"BLD",8189,"REQB","B","DG*5.3*838",9)
"BLD",8189,"REQB","B","DG*5.3*840",6)
"MBREQ")
0
"PKG",47,-1)
1^1
"PKG",47,0)
REGISTRATION^DG^PATIENT REGISTRATION, ADMISSION, DISCHARGE, EMBOSSER
"PKG",47,20,0)
^9.402P^^
"PKG",47,22,0)
^9.49I^1^1
"PKG",47,22,1,0)
5.3^2930813^2960613
"PKG",47,22,1,"PAH",1,0)
841^3110809^123456989
"QUES","XPF1",0)
Y
"QUES","XPF1","??")
^D REP^XPDH
"QUES","XPF1","A")
Shall I write over your |FLAG| File
"QUES","XPF1","B")
YES
"QUES","XPF1","M")
D XPF1^XPDIQ
"QUES","XPF2",0)
Y
"QUES","XPF2","??")
^D DTA^XPDH
"QUES","XPF2","A")
Want my data |FLAG| yours
"QUES","XPF2","B")
YES
"QUES","XPF2","M")
D XPF2^XPDIQ
"QUES","XPI1",0)
YO
"QUES","XPI1","??")
^D INHIBIT^XPDH
"QUES","XPI1","A")
Want KIDS to INHIBIT LOGONs during the install
"QUES","XPI1","B")
NO
"QUES","XPI1","M")
D XPI1^XPDIQ
"QUES","XPM1",0)
PO^VA(200,:EM
"QUES","XPM1","??")
^D MG^XPDH
"QUES","XPM1","A")
Enter the Coordinator for Mail Group '|FLAG|'
"QUES","XPM1","B")
"QUES","XPM1","M")
D XPM1^XPDIQ
"QUES","XPO1",0)
Y
"QUES","XPO1","??")
^D MENU^XPDH
"QUES","XPO1","A")
Want KIDS to Rebuild Menu Trees Upon Completion of Install
"QUES","XPO1","B")
NO
"QUES","XPO1","M")
D XPO1^XPDIQ
"QUES","XPZ1",0)
Y
"QUES","XPZ1","??")
^D OPT^XPDH
"QUES","XPZ1","A")
Want to DISABLE Scheduled Options, Menu Options, and Protocols
"QUES","XPZ1","B")
NO
"QUES","XPZ1","M")
D XPZ1^XPDIQ
"QUES","XPZ2",0)
Y
"QUES","XPZ2","??")
^D RTN^XPDH
"QUES","XPZ2","A")
Want to MOVE routines to other CPUs
"QUES","XPZ2","B")
NO
"QUES","XPZ2","M")
D XPZ2^XPDIQ
"RTN")
13
"RTN","DGENA")
0^1^B20613434
"RTN","DGENA",1,0)
DGENA ;ALB/CJM,ISA/KWP,Zoltan,LBD,CKN,EG,ERC,TDM - Enrollment API - Retrieve Data ; 3/3/11 3:36pm
"RTN","DGENA",2,0)
;;5.3;Registration;**121,122,147,232,314,564,672,659,653,688,841**;Aug 13, 1993;Build 7
"RTN","DGENA",3,0)
;
"RTN","DGENA",4,0)
FINDCUR(DFN) ;
"RTN","DGENA",5,0)
;Description: Used to find a patients current enrollment.
"RTN","DGENA",6,0)
;Input :
"RTN","DGENA",7,0)
; DFN - Patient IEN
"RTN","DGENA",8,0)
;Output:
"RTN","DGENA",9,0)
; Function Value - returns the internal entry number of the patient's
"RTN","DGENA",10,0)
; current enrollment if there is one, NULL otherwise. Checks that
"RTN","DGENA",11,0)
; current enrollment actually belongs to the patient.
"RTN","DGENA",12,0)
;
"RTN","DGENA",13,0)
Q:'$G(DFN) ""
"RTN","DGENA",14,0)
;
"RTN","DGENA",15,0)
N CUR
"RTN","DGENA",16,0)
S CUR=$P($G(^DPT(DFN,"ENR")),"^")
"RTN","DGENA",17,0)
I CUR,$P($G(^DGEN(27.11,CUR,0)),"^",2)'=DFN S CUR=""
"RTN","DGENA",18,0)
Q CUR
"RTN","DGENA",19,0)
;
"RTN","DGENA",20,0)
FINDPRI(DGENRIEN) ;
"RTN","DGENA",21,0)
;Description: Used to obtain a patient's enrollment record that was
"RTN","DGENA",22,0)
; prior to the enrollment identified by DGENRIEN.
"RTN","DGENA",23,0)
;Input :
"RTN","DGENA",24,0)
; DGENRIEN - this is the internal entry number of a PATIENT ENROLLMENT
"RTN","DGENA",25,0)
; record
"RTN","DGENA",26,0)
;Output:
"RTN","DGENA",27,0)
; Function Value - returns the internal entry number of the prior
"RTN","DGENA",28,0)
; enrollment for the patient if there is one, NULL otherwise.
"RTN","DGENA",29,0)
;
"RTN","DGENA",30,0)
Q:'$G(DGENRIEN) ""
"RTN","DGENA",31,0)
Q $P($G(^DGEN(27.11,DGENRIEN,0)),"^",9)
"RTN","DGENA",32,0)
;
"RTN","DGENA",33,0)
ENROLLED(DFN) ;
"RTN","DGENA",34,0)
;Description: Returns whether the patient is currently enrolled.
"RTN","DGENA",35,0)
;Input:
"RTN","DGENA",36,0)
; DFN - Patient IEN
"RTN","DGENA",37,0)
;Output:
"RTN","DGENA",38,0)
; Function Value - returns 1 if the patient is currently enrolled with
"RTN","DGENA",39,0)
; a status of VERIFIED, 0 otherwise
"RTN","DGENA",40,0)
;
"RTN","DGENA",41,0)
N STATUS
"RTN","DGENA",42,0)
S STATUS=$$STATUS($G(DFN))
"RTN","DGENA",43,0)
I (STATUS=2) Q 1
"RTN","DGENA",44,0)
Q 0
"RTN","DGENA",45,0)
;
"RTN","DGENA",46,0)
STATUS(DFN) ;
"RTN","DGENA",47,0)
;Description: Returns ENROLLMENT STATUS from the patient's current
"RTN","DGENA",48,0)
; enrollment.
"RTN","DGENA",49,0)
;Input:
"RTN","DGENA",50,0)
; DFN - Patient IEN
"RTN","DGENA",51,0)
;Output:
"RTN","DGENA",52,0)
; Function Value - If the patient has a current ENROLLMENT STATUS this
"RTN","DGENA",53,0)
; function will return its value, otherwise it returns NULL.
"RTN","DGENA",54,0)
N DGENRIEN
"RTN","DGENA",55,0)
S DGENRIEN=$$FINDCUR($G(DFN))
"RTN","DGENA",56,0)
Q:'DGENRIEN ""
"RTN","DGENA",57,0)
Q $P($G(^DGEN(27.11,DGENRIEN,0)),"^",4)
"RTN","DGENA",58,0)
;
"RTN","DGENA",59,0)
PRIORITY(DFN) ;
"RTN","DGENA",60,0)
;Description: Returns ENROLLMENT PRIORITY from the patient's current
"RTN","DGENA",61,0)
; enrollment.
"RTN","DGENA",62,0)
;Input:
"RTN","DGENA",63,0)
; DFN - Patient IEN
"RTN","DGENA",64,0)
;Output:
"RTN","DGENA",65,0)
; Function Value - If the patient has a current ENROLLMENT PRIORITY
"RTN","DGENA",66,0)
; this function will return its value, otherwise it returns NULL.
"RTN","DGENA",67,0)
N DGENRIEN
"RTN","DGENA",68,0)
S DGENRIEN=$$FINDCUR($G(DFN))
"RTN","DGENA",69,0)
Q:'DGENRIEN ""
"RTN","DGENA",70,0)
Q $P($G(^DGEN(27.11,DGENRIEN,0)),"^",7)
"RTN","DGENA",71,0)
;
"RTN","DGENA",72,0)
SOURCE(DFN) ;
"RTN","DGENA",73,0)
;Description: Returns SOURCE OF ENROLLMENT from the patient's current
"RTN","DGENA",74,0)
; enrollment.
"RTN","DGENA",75,0)
;Input:
"RTN","DGENA",76,0)
; DFN - Patient IEN
"RTN","DGENA",77,0)
;Output:
"RTN","DGENA",78,0)
; Function Value - If the patient has a current ENROLLMENT
"RTN","DGENA",79,0)
; this function will return the SOURCE OF ENROLLMENT, otherwise
"RTN","DGENA",80,0)
; it returns NULL.
"RTN","DGENA",81,0)
;
"RTN","DGENA",82,0)
N DGENRIEN
"RTN","DGENA",83,0)
S DGENRIEN=$$FINDCUR($G(DFN))
"RTN","DGENA",84,0)
Q:'DGENRIEN ""
"RTN","DGENA",85,0)
Q $P($G(^DGEN(27.11,DGENRIEN,0)),"^",3)
"RTN","DGENA",86,0)
;
"RTN","DGENA",87,0)
GET(DGENRIEN,DGENR) ;
"RTN","DGENA",88,0)
;Description: Used to obtain a record from the Patient Enrollment file
"RTN","DGENA",89,0)
; into the local DGENR array.
"RTN","DGENA",90,0)
;Input :
"RTN","DGENA",91,0)
; DGENRIEN - this is the internal entry number of a PATIENT ENROLLMENT record
"RTN","DGENA",92,0)
;Output:
"RTN","DGENA",93,0)
; Function Value - returns 1 on success, 0 on failure.
"RTN","DGENA",94,0)
; DGENR - this is the name of a local array, it should be passed by
"RTN","DGENA",95,0)
; reference. If the function is successful this array will
"RTN","DGENA",96,0)
; contain the enrollment.
"RTN","DGENA",97,0)
;
"RTN","DGENA",98,0)
; subscript field name
"RTN","DGENA",99,0)
; "APP" Enrollment Applicaiton Date
"RTN","DGENA",100,0)
; "DATE" Enrollment Date
"RTN","DGENA",101,0)
; "END" Enrollment End Date
"RTN","DGENA",102,0)
; "DFN" Patient IEN
"RTN","DGENA",103,0)
; "SOURCE" Enrollment Source
"RTN","DGENA",104,0)
; "STATUS" Enrollment Status
"RTN","DGENA",105,0)
; "REASON" Reason Canceled/Declined
"RTN","DGENA",106,0)
; "REMARKS" Canceled/Declined Remarks
"RTN","DGENA",107,0)
; "FACREC" Facility Received
"RTN","DGENA",108,0)
; "PRIORITY" Enrollment Priority
"RTN","DGENA",109,0)
; "SUBGRP" Enrollment Sub-Group
"RTN","DGENA",110,0)
; "EFFDATE" Effective Date
"RTN","DGENA",111,0)
; "PRIORREC" Prior Enrollment Record
"RTN","DGENA",112,0)
; "ELIG","CODE" Primary Eligibility Code
"RTN","DGENA",113,0)
; "ELIG","CODE",<code ien> Eligibility Codes
"RTN","DGENA",114,0)
; "ELIG","SC" Service Connected
"RTN","DGENA",115,0)
; "ELIG","SCPER" Service Connected Percentage
"RTN","DGENA",116,0)
; "ELIG","POW" POW Status Indicated
"RTN","DGENA",117,0)
; "ELIG","A&A" Receiving A&A Benefits
"RTN","DGENA",118,0)
; "ELIG","HB" Receiving Housebound Benefits
"RTN","DGENA",119,0)
; "ELIG","VAPEN" Receiving a VA Pension
"RTN","DGENA",120,0)
; "ELIG","VACKAMT" Total Annual VA Check Amount
"RTN","DGENA",121,0)
; "ELIG","DISRET" Military Disability Retirement
"RTN","DGENA",122,0)
; "ELIG","DISLOD" Discharged Due to Disability
"RTN","DGENA",123,0)
; "ELIG","MEDICAID" Medicaid
"RTN","DGENA",124,0)
; "ELIG","AO" Exposed to Agent Orange
"RTN","DGENA",125,0)
; "ELIG","AOEXPLOC" Agent Orange Exposure Location
"RTN","DGENA",126,0)
; "ELIG","IR" Radiation Exposure Indicated
"RTN","DGENA",127,0)
; "ELIG","RADEXPM" Radiation Exposure Method
"RTN","DGENA",128,0)
; "ELIG","EC" SW Asia Cond - was Env Con, DG*5.3*688
"RTN","DGENA",129,0)
; "ELIG","MTSTA" Means Test Status
"RTN","DGENA",130,0)
; "ELIG","VCD" Veteran Catastrophically Disabled?
"RTN","DGENA",131,0)
; "ELIG","PH" Purple Heart Indicated?
"RTN","DGENA",132,0)
; "ELIG","UNEMPLOY" Unemployable
"RTN","DGENA",133,0)
; "ELIG","CVELEDT" Combat Veteran End Date
"RTN","DGENA",134,0)
; "ELIG","SHAD" SHAD Indicated
"RTN","DGENA",135,0)
; "ELIG","MOH" Medal of Honor Indicated
"RTN","DGENA",136,0)
; "DATETIME" Date/Time Entered
"RTN","DGENA",137,0)
; "USER" Entered By
"RTN","DGENA",138,0)
;
"RTN","DGENA",139,0)
N SUB,NODE
"RTN","DGENA",140,0)
I '$G(DGENRIEN) Q 0
"RTN","DGENA",141,0)
I '$D(^DGEN(27.11,DGENRIEN,0)) Q 0
"RTN","DGENA",142,0)
K DGENR
"RTN","DGENA",143,0)
S DGENR=""
"RTN","DGENA",144,0)
S NODE=$G(^DGEN(27.11,DGENRIEN,0))
"RTN","DGENA",145,0)
S DGENR("APP")=$P(NODE,"^")
"RTN","DGENA",146,0)
S DGENR("DATE")=$P(NODE,"^",10)
"RTN","DGENA",147,0)
S DGENR("END")=$P(NODE,"^",11)
"RTN","DGENA",148,0)
S DGENR("DFN")=$P(NODE,"^",2)
"RTN","DGENA",149,0)
S DGENR("SOURCE")=$P(NODE,"^",3)
"RTN","DGENA",150,0)
S DGENR("STATUS")=$P(NODE,"^",4)
"RTN","DGENA",151,0)
S DGENR("REASON")=$P(NODE,"^",5)
"RTN","DGENA",152,0)
S DGENR("FACREC")=$P(NODE,"^",6)
"RTN","DGENA",153,0)
S DGENR("PRIORITY")=$P(NODE,"^",7)
"RTN","DGENA",154,0)
S DGENR("EFFDATE")=$P(NODE,"^",8)
"RTN","DGENA",155,0)
S DGENR("PRIORREC")=$P(NODE,"^",9)
"RTN","DGENA",156,0)
;Phase II Get enrollment sub-grp (SRS 6.4)
"RTN","DGENA",157,0)
S DGENR("SUBGRP")=$P(NODE,"^",12)
"RTN","DGENA",158,0)
S NODE=$G(^DGEN(27.11,DGENRIEN,"R"))
"RTN","DGENA",159,0)
S DGENR("REMARKS")=$P(NODE,"^")
"RTN","DGENA",160,0)
S NODE=$G(^DGEN(27.11,DGENRIEN,"E"))
"RTN","DGENA",161,0)
S DGENR("ELIG","CODE")=$P(NODE,"^")
"RTN","DGENA",162,0)
S DGENR("ELIG","SC")=$P(NODE,"^",2)
"RTN","DGENA",163,0)
S DGENR("ELIG","SCPER")=$P(NODE,"^",3)
"RTN","DGENA",164,0)
S DGENR("ELIG","POW")=$P(NODE,"^",4)
"RTN","DGENA",165,0)
S DGENR("ELIG","A&A")=$P(NODE,"^",5)
"RTN","DGENA",166,0)
S DGENR("ELIG","HB")=$P(NODE,"^",6)
"RTN","DGENA",167,0)
S DGENR("ELIG","VAPEN")=$P(NODE,"^",7)
"RTN","DGENA",168,0)
S DGENR("ELIG","VACKAMT")=$P(NODE,"^",8)
"RTN","DGENA",169,0)
S DGENR("ELIG","DISRET")=$P(NODE,"^",9)
"RTN","DGENA",170,0)
S DGENR("ELIG","DISLOD")=$P(NODE,"^",20) ;added with DG*5.3*672
"RTN","DGENA",171,0)
S DGENR("ELIG","MEDICAID")=$P(NODE,"^",10)
"RTN","DGENA",172,0)
S DGENR("ELIG","AO")=$P(NODE,"^",11)
"RTN","DGENA",173,0)
S DGENR("ELIG","AOEXPLOC")=$P(NODE,"^",22) ;added with DG*5.3*688
"RTN","DGENA",174,0)
S DGENR("ELIG","IR")=$P(NODE,"^",12)
"RTN","DGENA",175,0)
S DGENR("ELIG","EC")=$P(NODE,"^",13)
"RTN","DGENA",176,0)
S DGENR("ELIG","MTSTA")=$P(NODE,"^",14)
"RTN","DGENA",177,0)
S DGENR("ELIG","VCD")=$P(NODE,"^",15)
"RTN","DGENA",178,0)
S DGENR("ELIG","PH")=$P(NODE,"^",16)
"RTN","DGENA",179,0)
S DGENR("ELIG","UNEMPLOY")=$P(NODE,"^",17)
"RTN","DGENA",180,0)
S DGENR("ELIG","CVELEDT")=$P(NODE,"^",18)
"RTN","DGENA",181,0)
S DGENR("ELIG","SHAD")=$P(NODE,"^",19)
"RTN","DGENA",182,0)
S DGENR("ELIG","RADEXPM")=$P(NODE,"^",21)
"RTN","DGENA",183,0)
S DGENR("ELIG","MOH")=$P(NODE,"^",23)
"RTN","DGENA",184,0)
;S DGENCDZZ=1 ; for CD Testing (disabled).
"RTN","DGENA",185,0)
S NODE=$G(^DGEN(27.11,DGENRIEN,"U"))
"RTN","DGENA",186,0)
S DGENR("DATETIME")=$P(NODE,"^")
"RTN","DGENA",187,0)
S DGENR("USER")=$P(NODE,"^",2)
"RTN","DGENA",188,0)
Q 1
"RTN","DGENA",189,0)
;
"RTN","DGENA1A")
0^8^B15415989
"RTN","DGENA1A",1,0)
DGENA1A ;ALB/CJM,ISA/KWP,Zoltan,LBD,EG,CKN,ERC,TDM - Enrollment API - File Data Continued ; 5/10/11 12:03pm
"RTN","DGENA1A",2,0)
;;5.3;Registration;**121,147,232,314,564,672,659,653,688,841**;Aug 13,1993;Build 7
"RTN","DGENA1A",3,0)
;
"RTN","DGENA1A",4,0)
KILLALL(DGENRIEN) ;
"RTN","DGENA1A",5,0)
;kills all x-refs on the record in the Patient Enrollment file
"RTN","DGENA1A",6,0)
;pointed to by DGENRIEN
"RTN","DGENA1A",7,0)
;
"RTN","DGENA1A",8,0)
N DGENR,SUB,VALUE
"RTN","DGENA1A",9,0)
Q:'$G(DGENRIEN)
"RTN","DGENA1A",10,0)
Q:'$$GET^DGENA(DGENRIEN,.DGENR)
"RTN","DGENA1A",11,0)
S SUB=""
"RTN","DGENA1A",12,0)
F S SUB=$O(DGENR(SUB)) Q:SUB="" D
"RTN","DGENA1A",13,0)
.Q:(SUB="ELIG")
"RTN","DGENA1A",14,0)
.Q:DGENR(SUB)=""
"RTN","DGENA1A",15,0)
.D KILL(27.11,DGENRIEN,$$FIELD^DGENU(SUB),DGENR(SUB))
"RTN","DGENA1A",16,0)
S SUB=""
"RTN","DGENA1A",17,0)
F S SUB=$O(DGENR("ELIG",SUB)) Q:SUB="" D
"RTN","DGENA1A",18,0)
.Q:DGENR("ELIG",SUB)=""
"RTN","DGENA1A",19,0)
.D KILL(27.11,DGENRIEN,$$FIELD^DGENU(SUB),DGENR("ELIG",SUB))
"RTN","DGENA1A",20,0)
Q
"RTN","DGENA1A",21,0)
;
"RTN","DGENA1A",22,0)
SETALL(DGENRIEN,DGENR) ;
"RTN","DGENA1A",23,0)
;Sets all x-refs on the record in the Patient Enrollment file.
"RTN","DGENA1A",24,0)
;Inputs:
"RTN","DGENA1A",25,0)
; DGENRIEN - ptr to PATIENT ENROLLMENT file
"RTN","DGENA1A",26,0)
; DGENR - array containing the record, pass by reference
"RTN","DGENA1A",27,0)
;
"RTN","DGENA1A",28,0)
N SUB,VALUE
"RTN","DGENA1A",29,0)
Q:'$G(DGENRIEN)
"RTN","DGENA1A",30,0)
Q:'$D(DGENR)
"RTN","DGENA1A",31,0)
;
"RTN","DGENA1A",32,0)
S SUB=""
"RTN","DGENA1A",33,0)
F S SUB=$O(DGENR(SUB)) Q:SUB="" D
"RTN","DGENA1A",34,0)
.Q:(SUB="ELIG")
"RTN","DGENA1A",35,0)
.Q:DGENR(SUB)=""
"RTN","DGENA1A",36,0)
.D SET(27.11,DGENRIEN,$$FIELD^DGENU(SUB),DGENR(SUB))
"RTN","DGENA1A",37,0)
S SUB=""
"RTN","DGENA1A",38,0)
F S SUB=$O(DGENR("ELIG",SUB)) Q:SUB="" D
"RTN","DGENA1A",39,0)
.Q:DGENR("ELIG",SUB)=""
"RTN","DGENA1A",40,0)
.D SET(27.11,DGENRIEN,$$FIELD^DGENU(SUB),DGENR("ELIG",SUB))
"RTN","DGENA1A",41,0)
Q
"RTN","DGENA1A",42,0)
;
"RTN","DGENA1A",43,0)
KILL(FILE,IEN,FIELD,VALUE) ;
"RTN","DGENA1A",44,0)
;executes all the kill logic for x-refs on the field=FIELD for the
"RTN","DGENA1A",45,0)
;record=DGENRIEN for the file=FILE for the field value=VALUE
"RTN","DGENA1A",46,0)
;
"RTN","DGENA1A",47,0)
N D0,DA,DIV,DGIX,X
"RTN","DGENA1A",48,0)
S DA=IEN,X=VALUE,DGIX=0
"RTN","DGENA1A",49,0)
F S DGIX=$O(^DD(FILE,FIELD,1,DGIX)) Q:'DGIX X ^(DGIX,2) S X=VALUE
"RTN","DGENA1A",50,0)
Q
"RTN","DGENA1A",51,0)
;
"RTN","DGENA1A",52,0)
SET(FILE,IEN,FIELD,VALUE) ;
"RTN","DGENA1A",53,0)
;executes all the set logic for x-refs on the field=FIELD for the
"RTN","DGENA1A",54,0)
;record=DGENRIEN for the file=FILE for the field value=VALUE
"RTN","DGENA1A",55,0)
;
"RTN","DGENA1A",56,0)
N D0,DA,DIV,DGIX,X
"RTN","DGENA1A",57,0)
S DA=IEN,X=VALUE,DGIX=0
"RTN","DGENA1A",58,0)
F S DGIX=$O(^DD(FILE,FIELD,1,DGIX)) Q:'DGIX X ^(DGIX,1)
"RTN","DGENA1A",59,0)
Q
"RTN","DGENA1A",60,0)
;
"RTN","DGENA1A",61,0)
EDIT(DA,DGENR) ;
"RTN","DGENA1A",62,0)
;Description: Overlays a currently existing record, ien=DA, with values
"RTN","DGENA1A",63,0)
; from DGENR array
"RTN","DGENA1A",64,0)
;Input -
"RTN","DGENA1A",65,0)
; DA - ien of record in Patient Enrollment file
"RTN","DGENA1A",66,0)
; DGENR - array containing an enrollment, pass by reference
"RTN","DGENA1A",67,0)
;Output - 1 on success, 0 on failure
"RTN","DGENA1A",68,0)
;
"RTN","DGENA1A",69,0)
; *** NOTE: This is called from within FM. There is a problem in ***
"RTN","DGENA1A",70,0)
; *** that ^DIE can not be used. Instead, the fields ***
"RTN","DGENA1A",71,0)
; *** are hard-set and cross-referenced. ***
"RTN","DGENA1A",72,0)
;
"RTN","DGENA1A",73,0)
N NODE
"RTN","DGENA1A",74,0)
Q:'$G(DA) 0
"RTN","DGENA1A",75,0)
S NODE=$G(^DGEN(27.11,$G(DA),0))
"RTN","DGENA1A",76,0)
Q:NODE="" 0
"RTN","DGENA1A",77,0)
;
"RTN","DGENA1A",78,0)
;kill off all the cross-references (FM doesn't have an API to do this)
"RTN","DGENA1A",79,0)
D KILLALL(DA)
"RTN","DGENA1A",80,0)
;
"RTN","DGENA1A",81,0)
;now hand-set all the fields
"RTN","DGENA1A",82,0)
;Phase II Add subgroup to the 12 piece (SRS 6.4)
"RTN","DGENA1A",83,0)
S NODE=DGENR("APP")_U_DGENR("DFN")_U_DGENR("SOURCE")_U_DGENR("STATUS")_U_DGENR("REASON")_U_DGENR("FACREC")_U_DGENR("PRIORITY")_U_DGENR("EFFDATE")_U_DGENR("PRIORREC")_U_DGENR("DATE")_U_DGENR("END")_U_DGENR("SUBGRP")
"RTN","DGENA1A",84,0)
S ^DGEN(27.11,DA,0)=NODE
"RTN","DGENA1A",85,0)
S ^DGEN(27.11,DA,"R")=DGENR("REMARKS")
"RTN","DGENA1A",86,0)
S NODE=DGENR("ELIG","CODE")
"RTN","DGENA1A",87,0)
S NODE=NODE_U_DGENR("ELIG","SC")
"RTN","DGENA1A",88,0)
S NODE=NODE_U_DGENR("ELIG","SCPER")
"RTN","DGENA1A",89,0)
S NODE=NODE_U_DGENR("ELIG","POW")
"RTN","DGENA1A",90,0)
S NODE=NODE_U_DGENR("ELIG","A&A")
"RTN","DGENA1A",91,0)
S NODE=NODE_U_DGENR("ELIG","HB")
"RTN","DGENA1A",92,0)
S NODE=NODE_U_DGENR("ELIG","VAPEN")
"RTN","DGENA1A",93,0)
S NODE=NODE_U_DGENR("ELIG","VACKAMT")
"RTN","DGENA1A",94,0)
S NODE=NODE_U_DGENR("ELIG","DISRET")
"RTN","DGENA1A",95,0)
S NODE=NODE_U_DGENR("ELIG","MEDICAID")
"RTN","DGENA1A",96,0)
S NODE=NODE_U_DGENR("ELIG","AO")
"RTN","DGENA1A",97,0)
S NODE=NODE_U_DGENR("ELIG","IR")
"RTN","DGENA1A",98,0)
S NODE=NODE_U_DGENR("ELIG","EC") ;changed to SW Asia Cond - DG*5.3*688
"RTN","DGENA1A",99,0)
S NODE=NODE_U_DGENR("ELIG","MTSTA")
"RTN","DGENA1A",100,0)
S NODE=NODE_U_DGENR("ELIG","VCD")
"RTN","DGENA1A",101,0)
S NODE=NODE_U_DGENR("ELIG","PH")
"RTN","DGENA1A",102,0)
S NODE=NODE_U_DGENR("ELIG","UNEMPLOY")
"RTN","DGENA1A",103,0)
S NODE=NODE_U_DGENR("ELIG","CVELEDT")
"RTN","DGENA1A",104,0)
S NODE=NODE_U_DGENR("ELIG","SHAD") ;field added with DG*5.3*653
"RTN","DGENA1A",105,0)
S NODE=NODE_U_DGENR("ELIG","DISLOD") ;field added with DG*5.3*672
"RTN","DGENA1A",106,0)
S NODE=NODE_U_DGENR("ELIG","RADEXPM")
"RTN","DGENA1A",107,0)
S NODE=NODE_U_DGENR("ELIG","AOEXPLOC") ;field added with DG*5.3*688
"RTN","DGENA1A",108,0)
S NODE=NODE_U_DGENR("ELIG","MOH") ;field added with DG*5.3*841
"RTN","DGENA1A",109,0)
S ^DGEN(27.11,DA,"E")=NODE
"RTN","DGENA1A",110,0)
S ^DGEN(27.11,DA,"U")=DGENR("DATETIME")_U_DGENR("USER")
"RTN","DGENA1A",111,0)
;
"RTN","DGENA1A",112,0)
;set the x-refs
"RTN","DGENA1A",113,0)
D SETALL(DA,.DGENR)
"RTN","DGENA1A",114,0)
Q 1
"RTN","DGENELA")
0^2^B27857025
"RTN","DGENELA",1,0)
DGENELA ;ALB/CJM,KCL,Zoltan/PJR,RGL,LBD,EG,TMK,CKN,ERC,TDM - Patient Eligibility API ; 3/3/11 3:40pm
"RTN","DGENELA",2,0)
;;5.3;Registration;**121,147,232,314,451,564,631,672,659,583,653,688,841**;Aug 13,1993;Build 7
"RTN","DGENELA",3,0)
;
"RTN","DGENELA",4,0)
GET(DFN,DGELG) ;
"RTN","DGENELA",5,0)
;Description: Used to obtain the patient eligibility data.
"RTN","DGENELA",6,0)
; The data is placed in the local DGELG array.
"RTN","DGENELA",7,0)
;Input:
"RTN","DGENELA",8,0)
; DFN - internal entry number of a record in the PATIENT file
"RTN","DGENELA",9,0)
;Output:
"RTN","DGENELA",10,0)
; Function Value - returns 1 on success, 0 on failure
"RTN","DGENELA",11,0)
; DGELG - this is a local array that will be used to return patient eligibility data. The array subscripts and the fields mapped to are defined below. (pass by reference)
"RTN","DGENELA",12,0)
;
"RTN","DGENELA",13,0)
;subscript field name
"RTN","DGENELA",14,0)
;"DFN" ien Patient record
"RTN","DGENELA",15,0)
;"ELIG","CODE" Primary Eligibility Code
"RTN","DGENELA",16,0)
;"ELIG","CODE",<ien> Patient Eligibilities
"RTN","DGENELA",17,0)
;"SC" Service Connected
"RTN","DGENELA",18,0)
;"SCPER" Service Connected Percentage
"RTN","DGENELA",19,0)
;"EFFDT" SC Combined Effective Date
"RTN","DGENELA",20,0)
;"POW" POW Status Indicated
"RTN","DGENELA",21,0)
;"A&A" Receiving A&A Benefits
"RTN","DGENELA",22,0)
;"HB" Receiving Housebound Benefits
"RTN","DGENELA",23,0)
;"VAPEN" Receiving a VA Pension
"RTN","DGENELA",24,0)
;"VACKAMT" Total Annual VA Check Amount
"RTN","DGENELA",25,0)
;"DISRET" Military Disability Retirement
"RTN","DGENELA",26,0)
;"DISLOD" Discharge Due to Disability (added with DG 672)
"RTN","DGENELA",27,0)
;"MEDICAID" Medicaid
"RTN","DGENELA",28,0)
;"MEDASKDT" Date Medicaid Last Asked
"RTN","DGENELA",29,0)
;"AO" Exposed to Agent Orange
"RTN","DGENELA",30,0)
;"IR" Radiation Exposure Indicated
"RTN","DGENELA",31,0)
;"RADEXPM" Radiation Exposure Method
"RTN","DGENELA",32,0)
;"EC" SW Asia Cond - change from Env Con, DG*5.3*688
"RTN","DGENELA",33,0)
;"MTSTA" Means Test Status
"RTN","DGENELA",34,0)
;P&T P&T
"RTN","DGENELA",35,0)
;P&TDT P&T EFFECTIVE DATE (added with DG 688)
"RTN","DGENELA",36,0)
;POS PERIOD OF SERVICE
"RTN","DGENELA",37,0)
;UNEMPLOY UNEMPLOYABLE
"RTN","DGENELA",38,0)
;SCAWDATE SC AWARD DATE
"RTN","DGENELA",39,0)
;RATEINC RATED INCOMPETENT
"RTN","DGENELA",40,0)
;CLAIMNUM CLAIM NUMBER
"RTN","DGENELA",41,0)
;CLAIMLOC CLAIM FOLDER LOCATION
"RTN","DGENELA",42,0)
;VADISAB RECEIVING VA DISABILITY?
"RTN","DGENELA",43,0)
;ELIGSTA ELIGIBILITY STATUS
"RTN","DGENELA",44,0)
;ELIGSTADATE ELIGIBILITY STATUS DATE
"RTN","DGENELA",45,0)
;ELIGVERIF ELIGIBILITY VERIF. METHOD
"RTN","DGENELA",46,0)
;ELIGVSITE ELIGIBILITY VERIFICATION SITE
"RTN","DGENELA",47,0)
;ELIGENTBY ELIGIBILITY STATUS ENTERED BY
"RTN","DGENELA",48,0)
;RATEDIS
"RTN","DGENELA",49,0)
; <COUNT>,"RD" RATED DISABILITY
"RTN","DGENELA",50,0)
; <COUNT>,"PER" DISABILITY %
"RTN","DGENELA",51,0)
; <COUNT>,"RDSC" SERVICE CONNECTED
"RTN","DGENELA",52,0)
; <COUNT>,"RDEXT" EXTREMITY
"RTN","DGENELA",53,0)
; <COUNT>,"RDORIG" ORIGINAL RD EFFECTIVE DATE
"RTN","DGENELA",54,0)
; <COUNT>."RDCURR" CURRENT RD EFFECTIVE DATE
"RTN","DGENELA",55,0)
;"VCD" Veteran Catastrophically Disabled? (#.39)
"RTN","DGENELA",56,0)
;"PH" PURPLE HEART INDICATED
"RTN","DGENELA",57,0)
;"AOEXPLOC" AGENT ORANGE EXPOSURE LOCATION
"RTN","DGENELA",58,0)
;"CVELEDT" COMBAT VETERAN END DATE
"RTN","DGENELA",59,0)
;"SHAD" SHAD EXPOSURE
"RTN","DGENELA",60,0)
;"MOH" MEDAL OF HONOR
"RTN","DGENELA",61,0)
;
"RTN","DGENELA",62,0)
K DGELG
"RTN","DGENELA",63,0)
S DGELG=""
"RTN","DGENELA",64,0)
Q:'$D(^DPT(DFN)) 0