source: Scheduling/branches/Radiology-Support/m/BSDX32.m@ 1150

Last change on this file since 1150 was 1141, checked in by Sam Habiel, 14 years ago

BSDX32: Hospital Location has extra column IS_RADIOLOGY_LOCATION to link if that HL is tied to the Radiology Package
BDDX01: GETRADEX: Get Radiology Exams for a Patient in a specific HL;
BSDX01: SCHRAEX: Schedule Radiology Exam
BSDX01: HOLDRAEX: Hold Radiology Exam
BSDX02: Added Radiology Exam Field, to retrieve Radiology Exam associated with appt
BSDX07: Support for adding Radiology Exams to Appointment. BSDX APPOINTMENT file now has a Radiology Exam that points to file 75.1 (RAD/NUC MED ORDERS)
BSDX28: Added support for searching by DFN from Scheduling GUI by accent grave notation.

File size: 3.7 KB
RevLine 
[1141]1BSDX32 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 4/7/11 12:30pm
[1116]2 ;;1.5V3;BSDX;;Mar 16, 2011
[614]3 ;
4 ;
5ERROR ;
6 D ERR("RPMS Error")
7 Q
8 ;
9ERR(BSDXERR) ;Error processing
10 S BSDXI=BSDXI+1
11 S ^BSDXTMP($J,BSDXI)=$C(31)
12 Q
13 ;
14HOSPLOCD(BSDXY) ;EP Debugging entry point
15 ;
16 ;D DEBUG^%Serenji("HOSPLOC^BSDX32(.BSDXY)")
17 ;
18 Q
19 ;
20HOSPLOC(BSDXY) ;EP
21 ;Called by BSDX HOSPITAL LOCATION
[968]22 ;Returns all hospital locations that are active
[614]23 ;
24 N BSDXI,BSDXIEN,BSDXNOD,BSDXNAM,BSDXINA,BSDXREA,BSDXSCOD
25 D ^XBKVAR S X="ERROR^BSDX32",@^%ZOSF("TRAP")
26 K ^BSDXTMP($J)
27 S BSDXY="^BSDXTMP("_$J_")"
28 S BSDXI=0
29 ;"SELECT BSDXIEN 'HOSPITAL_LOCATION_ID', NAME 'HOSPITAL_LOCATION', DEFAULT_PROVIDER, STOP_CODE_NUMBER, INACTIVATE_DATE, REACTIVATE_DATE FROM HOSPITAL_LOCATION";
[1141]30 S ^BSDXTMP($J,BSDXI)="I00020HOSPITAL_LOCATION_ID^T00040HOSPITAL_LOCATION^T00030DEFAULT_PROVIDER^T00030STOP_CODE_NUMBER^D00020INACTIVATE_DATE^D00020REACTIVATE_DATE^T00001IS_RADIOLOGY_LOCATION"_$C(30)
[614]31 ;
32 S BSDXNAM="" F S BSDXNAM=$O(^SC("B",BSDXNAM)) Q:BSDXNAM="" D
33 . S BSDXIEN=$O(^SC("B",BSDXNAM,0))
34 . Q:'+BSDXIEN>0
35 . Q:'$D(^SC(+BSDXIEN,0))
[968]36 . ;Q:'$$INDIV^BSDX01(+BSDXIEN) ; if not in the same division, quit
[614]37 . S BSDXINA=$$GET1^DIQ(44,BSDXIEN_",",2505) ;INACTIVATE
38 . S BSDXREA=$$GET1^DIQ(44,BSDXIEN_",",2506) ;REACTIVATE
39 . I BSDXINA]""&(BSDXREA="") Q ;Clinic is inactivated and has no reactivate date
40 . S BSDXNOD=^SC(BSDXIEN,0)
41 . S BSDXNAM=$P(BSDXNOD,U)
42 . S BSDXSCOD=$$GET1^DIQ(44,BSDXIEN_",",8) ;STOP CODE
43 . ;Calculate default provider
44 . S BSDXPRV=""
45 . I $D(^SC(BSDXIEN,"PR")) D
46 . . S BSDXIEN1=0 F S BSDXIEN1=$O(^SC(BSDXIEN,"PR",BSDXIEN1)) Q:'+BSDXIEN1 Q:BSDXPRV]"" D
47 . . . S BSDXNOD1=$G(^SC(BSDXIEN,"PR",BSDXIEN1,0))
48 . . . S:$P(BSDXNOD1,U,2)="1" BSDXPRV=$$GET1^DIQ(200,$P(BSDXNOD1,U),.01)
49 . . . Q
50 . . Q
[1141]51 . ; Decide if this is a radiology location - Check "B" index of ^RA(79.1 global to see if HL is there
52 . N BSDXISRAD S BSDXISRAD=''$DATA(^RA(79.1,"B",BSDXIEN))
[614]53 . S BSDXI=BSDXI+1
[1141]54 . S ^BSDXTMP($J,BSDXI)=BSDXIEN_U_BSDXNAM_U_BSDXPRV_U_BSDXSCOD_U_BSDXINA_U_BSDXREA_U_BSDXISRAD_$C(30)
[614]55 . Q
56 S BSDXI=BSDXI+1
57 S ^BSDXTMP($J,BSDXI)=$C(31)
58 Q
59 ;
60CLNSETD(BSDXY) ;EP Debugging entry point
61 ;
62 ;D DEBUG^%Serenji("CLNSET^BSDX32(.BSDXY)")
63 ;
64 Q
65 ;
66CLNSET(BSDXY) ;EP
67 ;Called by BSDX CLINIC SETUP
68 ;Returns CLINIC SETUP file entries for clinics which
69 ;are active in ^SC
70 N BSDXI,BSDXIEN,BSDXNOD,BSDXNAM,BSDXINA,BSDXREA
71 N BSDXCRV,BSDXVSC,BSDXMULT,BSDXREQ,BSDXPCC
72 D ^XBKVAR S X="ERROR^BSDX32",@^%ZOSF("TRAP")
73 K ^BSDXTMP($J)
74 S BSDXY="^BSDXTMP("_$J_")"
75 S BSDXI=0
76 ;SELECT BMXIEN 'HOSPITAL_LOCATION_ID', CLINIC_NAME 'HOSPITAL_LOCATION', CREATE_VISIT_AT_CHECK-IN? 'CREATE_VISIT', VISIT_SERVICE_CATEGORY, MULTIPLE_CLINIC_CODES_USED?, VISIT_PROVIDER_REQUIRED,
77 ;GENERATE_PCCPLUS_FORMS? FROM CLINIC_SETUP_PARAMETERS
78 S ^BSDXTMP($J,BSDXI)="I00020HOSPITAL_LOCATION_ID^T00040HOSPITAL_LOCATION^T00030CREATE_VISIT^T00030VISIT_SERVICE_CATEGORY^T00030MULTIPLE_CLINIC_CODES_USED?^T00030VISIT_PROVIDER_REQUIRED^T00030GENERATE_PCCPLUS_FORMS?"_$C(30)
79 ;
80 S BSDXIEN=0 F S BSDXIEN=$O(^BSDSC(BSDXIEN)) Q:'+BSDXIEN D
81 . Q:'$D(^SC(+BSDXIEN,0))
82 . Q:'$D(^BSDSC(+BSDXIEN,0))
83 . S BSDXINA=$$GET1^DIQ(44,BSDXIEN_",",2505) ;INACTIVATE
84 . S BSDXREA=$$GET1^DIQ(44,BSDXIEN_",",2506) ;REACTIVATE
85 . I BSDXINA]""&(BSDXREA="") Q ;Clinic is inactivated and has no reactivate date
86 . S BSDXNOD=^BSDSC(BSDXIEN,0)
87 . S BSDXNAM=$$GET1^DIQ(44,BSDXIEN_",",.01)
88 . S BSDXCRV=$$GET1^DIQ(9009017.2,BSDXIEN_",",.09)
89 . S BSDXVSC=$$GET1^DIQ(9009017.2,BSDXIEN_",",.12)
90 . S BSDXMULT=$$GET1^DIQ(9009017.2,BSDXIEN_",",.13)
91 . S BSDXREQ=$$GET1^DIQ(9009017.2,BSDXIEN_",",.14)
92 . S BSDXPCC=$$GET1^DIQ(9009017.2,BSDXIEN_",",.15)
93 . S BSDXI=BSDXI+1
94 . S ^BSDXTMP($J,BSDXI)=BSDXIEN_U_BSDXNAM_U_BSDXCRV_U_BSDXVSC_U_BSDXMULT_U_BSDXREQ_U_BSDXPCC_$C(30)
95 . Q
96 S BSDXI=BSDXI+1
97 S ^BSDXTMP($J,BSDXI)=$C(31)
98 Q
Note: See TracBrowser for help on using the repository browser.