Changeset 1472 for Scheduling/trunk
- Timestamp:
- Jul 6, 2012, 2:28:15 PM (12 years ago)
- Location:
- Scheduling/trunk/m
- Files:
-
- 41 edited
Legend:
- Unmodified
- Added
- Removed
-
Scheduling/trunk/m/BSDX01.m
r1187 r1472 1 BSDX01 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 5/16/11 2:46pm2 ;;1. 6T2;BSDX;;May 16, 20111 BSDX01 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 7/6/12 10:52am 2 ;;1.7T1;BSDX;;Jul 06, 2012;Build 18 3 3 ; Licensed under LGPL 4 4 ; … … 282 282 ; 283 283 INDIV(BSDXSC) ; PEP - Is ^SC clinic in the same DUZ(2) as user? 284 ; Input: BSDXSC - Hospital Location IEN 285 ; Output: True or False 286 I '+BSDXSC QUIT 1 ;If not tied to clinic, yes 287 I '$D(^SC(BSDXSC,0)) QUIT 1 ; If Clinic does not exist, yes 288 ; Jump to Division:Medical Center Division:Inst File Pointer for 289 ; Institution IEN (and get its internal value) 290 N DIV S DIV=$$GET1^DIQ(44,BSDXSC_",","3.5:.07","I") 291 I DIV="" Q 1 ; If clinic has no division, consider it avial to user. 292 I DIV=DUZ(2) Q 1 ; If same, then User is in same Div as Clinic 293 E Q 0 ; Otherwise, no 294 QUIT 284 ; Input: BSDXSC - Hospital Location IEN 285 ; Output: True or False 286 I '+BSDXSC QUIT 1 ;If not tied to clinic, yes 287 I '$D(^SC(BSDXSC,0)) QUIT 1 ; If Clinic does not exist, yes 288 ; Jump to Division:Medical Center Division:Inst File Pointer for 289 ; Institution IEN (and get its internal value) 290 N DIV S DIV=$$GET1^DIQ(44,BSDXSC_",","3.5:.07","I") 291 I DIV="" Q 1 ; If clinic has no division, consider it avial to user. 292 I DIV=DUZ(2) Q 1 ; If same, then User is in same Div as Clinic 293 E Q 0 ; Otherwise, no 295 294 INDIV2(BSDXRES) ; PEP - Is Resource in the same DUZ(2) as user? 296 297 298 299 U nitTestINDIV300 301 302 303 304 305 306 307 308 309 310 311 312 313 U nitTestINDIV2314 315 316 317 318 319 320 321 295 ; Input BSDXRES - BSDX RESOURCE IEN 296 ; Output: True of False 297 Q $$INDIV($P($G(^BSDXRES(BSDXRES,0)),U,4)) ; Extract Hospital Location and send to $$INDIV 298 UTINDIV ; Unit Test $$INDIV 299 W "Testing if they are the same",! 300 S DUZ(2)=67 301 I '$$INDIV(1) W "ERROR",! 302 I '$$INDIV(2) W "ERROR",! 303 W "Testing if Div not defined in 44, should be true",! 304 I '$$INDIV(3) W "ERROR",! 305 W "Testing empty string. Should be true",! 306 I '$$INDIV("") W "ERROR",! 307 W "Testing if they are different",! 308 S DUZ(2)=899 309 I $$INDIV(1) W "ERROR",! 310 I $$INDIV(2) W "ERROR",! 311 QUIT 312 UTINDIV2 ; Unit Test $$INDIV2 313 W "Testing if they are the same",! 314 S DUZ(2)=69 315 I $$INDIV2(22)'=0 W "ERROR",! 316 I $$INDIV2(25)'=1 W "ERROR",! 317 I $$INDIV2(26)'=1 W "ERROR",! 318 I $$INDIV2(27)'=1 W "ERROR",! 319 QUIT 320 ; 322 321 GETRADEX(BSDXY,DFN,SCIEN) ; Get All Pending and On Hold Radiology Exams for Patient; RPC EP; UJO/SMH new in v 1.6 323 322 ; RPC: BSDX GET RAD EXAM FOR PT; Return: Global Array -
Scheduling/trunk/m/BSDX02.m
r1187 r1472 1 BSDX02 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 5/16/11 2:47pm2 ;;1. 6T2;BSDX;;May 16, 20111 BSDX02 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 7/6/12 11:09am 2 ;;1.7T1;BSDX;;Jul 06, 2012;Build 18 3 3 ;Licensed under LGPL 4 4 ; Change Log … … 30 30 S BSDXERR="" 31 31 S BSDXY="^BSDXTMP("_$J_")" 32 S ^BSDXTMP($J,0)="I00020APPOINTMENTID^D00030START_TIME^D00030END_TIME^D00030CHECKIN^D00030AUXTIME^I00020PATIENTID^T00030PATIENTNAME^T00030RESOURCENAME^I00005NOSHOW^T00020HRN^I00005ACCESSTYPEID^I00005WALKIN^T00250NOTE^T00006SEX^T00040PID^D00030DOB^I00020RADIOLOGY_EXAM"_$C(30) 32 S ^BSDXTMP($J,0)="I00020APPOINTMENTID^D00030START_TIME^D00030END_TIME^D00030CHECKIN^D00030AUXTIME^I00020PATIENTID^T00030PATIENTNAME^T00030RESOURCENAME" 33 S ^(0)=^(0)_"^I00005NOSHOW^T00020HRN^I00005ACCESSTYPEID^I00005WALKIN^T00250NOTE^T00006SEX^T00040PID^D00030DOB^I00020RADIOLOGY_EXAM"_$C(30) 33 34 D ^XBKVAR S X="ETRAP^BSDX02",@^%ZOSF("TRAP") 34 35 ; … … 37 38 ; S %DT="T",X=BSDXEND D ^%DT S BSDXEND=Y 38 39 ; I BSDXEND=-1 S ^BSDXTMP($J,1)=$C(31) Q 39 40 ; 40 41 S BSDXI=0 41 42 D STRES -
Scheduling/trunk/m/BSDX03.m
r1187 r1472 1 1 BSDX03 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 4/28/11 10:14am 2 ;;1. 6T2;BSDX;;May 16, 20112 ;;1.7T1;BSDX;;Jul 06, 2012;Build 18 3 3 ;Licensed under LGPL 4 4 ; -
Scheduling/trunk/m/BSDX04.m
r1187 r1472 1 BSDX04 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; ; 4/28/11 10:15am2 ;;1. 6T2;BSDX;;May 16, 20111 BSDX04 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; ; 7/6/12 10:55am 2 ;;1.7T1;BSDX;;Jul 06, 2012;Build 18 3 3 ; Licensed under LGPL 4 4 ; Change Log: … … 74 74 . Q:BSDXRESN="" 75 75 . Q:'$D(^BSDXRES("B",BSDXRESN)) 76 . S BSDXRESD=$O(^BSDXRES("B",BSDXRESN,0)) 76 . S BSDXRESD=$O(^BSDXRES("B",BSDXRESN,0)) 77 77 . Q:'+BSDXRESD 78 78 . Q:'$D(^BSDXAB("ARSCT",BSDXRESD)) -
Scheduling/trunk/m/BSDX05.m
r1187 r1472 1 1 BSDX05 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 4/28/11 10:16am 2 ;;1. 6T2;BSDX;;May 16, 20112 ;;1.7T1;BSDX;;Jul 06, 2012;Build 18 3 3 ; Licensed under LGPL 4 4 ; -
Scheduling/trunk/m/BSDX06.m
r1187 r1472 1 1 BSDX06 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 4/28/11 10:16am 2 ;;1. 6T2;BSDX;;May 16, 20112 ;;1.7T1;BSDX;;Jul 06, 2012;Build 18 3 3 ; Licensed under LGPL 4 4 ; Change Log: -
Scheduling/trunk/m/BSDX07.m
r1467 r1472 1 1 BSDX07 ; VW/UJO/SMH - WINDOWS SCHEDULING RPCS ; 7/5/12 12:57pm 2 ;;1.7T1;BSDX;; Aug 31, 2011;Build 182 ;;1.7T1;BSDX;;Jul 06, 2012;Build 18 3 3 ; Licensed under LGPL 4 4 ; … … 66 66 ; Deal with optional arguments 67 67 S BSDXRADEXAM=$G(BSDXRADEXAM) 68 68 ; 69 69 ; Return Array; set Return and clear array 70 70 S BSDXY=$NA(^BSDXTMP($J)) 71 71 K ^BSDXTMP($J) 72 72 ; 73 73 ; $ET 74 74 N $ET S $ET="G ETRAP^BSDX07" … … 238 238 Q 239 239 ; 240 ROLLBACK(BSDXAPPTID,BSDXC) 240 ROLLBACK(BSDXAPPTID,BSDXC) ; Private EP; Roll back appointment set 241 241 ; DO NOT USE except as an emergency measure - only if unforseen error occurs 242 242 ; Input: -
Scheduling/trunk/m/BSDX08.m
r1467 r1472 1 1 BSDX08 ; VW/UJO/SMH - WINDOWS SCHEDULING RPCS ; 7/5/12 12:39pm 2 ;;1.7T1;BSDX;; Aug 31, 2011;Build 182 ;;1.7T1;BSDX;;Jul 06, 2012;Build 18 3 3 ; 4 4 ; Original by HMW. New Written by Sam Habiel. Licensed under LGPL. … … 152 152 QUIT 0 153 153 ; 154 ROLLBACK(BSDXAPTID) 154 ROLLBACK(BSDXAPTID) ; Proc; Private; Rollback cancellation 155 155 ; Input same as $$BSDXCAN 156 156 N BSDXIENS S BSDXIENS=BSDXAPTID_"," -
Scheduling/trunk/m/BSDX09.m
r1452 r1472 1 BSDX09 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; ; 4/28/11 10:18am2 ;;1. 6;BSDX;;Aug 31, 2011;Build 181 BSDX09 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; ; 6/21/12 11:03am 2 ;;1.7T1;BSDX;;Jul 06, 2012;Build 18 3 3 ; Licensed under LGPL 4 4 ; -
Scheduling/trunk/m/BSDX11.m
r1187 r1472 1 1 BSDX11 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 4/28/11 10:18am 2 ;;1. 6T2;BSDX;;May 16, 20112 ;;1.7T1;BSDX;;Jul 06, 2012;Build 18 3 3 ; Licensed under LGPL 4 4 ; -
Scheduling/trunk/m/BSDX12.m
r1187 r1472 1 1 BSDX12 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 4/28/11 10:18am 2 ;;1. 6T2;BSDX;;May 16, 20112 ;;1.7T1;BSDX;;Jul 06, 2012;Build 18 3 3 ; Licensed under LGPL 4 4 ; -
Scheduling/trunk/m/BSDX13.m
r1187 r1472 1 1 BSDX13 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 4/28/11 10:19am 2 ;;1. 6T2;BSDX;;May 16, 20112 ;;1.7T1;BSDX;;Jul 06, 2012;Build 18 3 3 ; Licensed under LGPL 4 4 ; -
Scheduling/trunk/m/BSDX14.m
r1187 r1472 1 1 BSDX14 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 4/28/11 10:19am 2 ;;1. 6T2;BSDX;;May 16, 20112 ;;1.7T1;BSDX;;Jul 06, 2012;Build 18 3 3 ; Licensed under LGPL 4 4 ; -
Scheduling/trunk/m/BSDX15.m
r1187 r1472 1 1 BSDX15 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 4/28/11 10:19am 2 ;;1. 6T2;BSDX;;May 16, 20112 ;;1.7T1;BSDX;;Jul 06, 2012;Build 18 3 3 ; Licensed under LGPL 4 4 ; -
Scheduling/trunk/m/BSDX16.m
r1187 r1472 1 1 BSDX16 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; ; 4/28/11 10:20am 2 ;;1. 6T2;BSDX;;May 16, 20112 ;;1.7T1;BSDX;;Jul 06, 2012;Build 18 3 3 ; Licensed under LGPL 4 4 ; -
Scheduling/trunk/m/BSDX17.m
r1187 r1472 1 1 BSDX17 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 4/28/11 10:20am 2 ;;1. 6T2;BSDX;;May 16, 20112 ;;1.7T1;BSDX;;Jul 06, 2012;Build 18 3 3 ; Licensed under LGPL 4 4 ; -
Scheduling/trunk/m/BSDX18.m
r1187 r1472 1 1 BSDX18 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 4/28/11 10:20am 2 ;;1. 6T2;BSDX;;May 16, 20112 ;;1.7T1;BSDX;;Jul 06, 2012;Build 18 3 3 ; Licensed under LGPL 4 4 ; -
Scheduling/trunk/m/BSDX19.m
r1187 r1472 1 1 BSDX19 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 4/28/11 10:21am 2 ;;1. 6T2;BSDX;;May 16, 20112 ;;1.7T1;BSDX;;Jul 06, 2012;Build 18 3 3 ; Licensed under LGPL 4 4 ; -
Scheduling/trunk/m/BSDX20.m
r1187 r1472 1 1 BSDX20 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 4/28/11 10:21am 2 ;;1. 6T2;BSDX;;May 16, 20112 ;;1.7T1;BSDX;;Jul 06, 2012;Build 18 3 3 ; Licensed under LGPL 4 4 ; -
Scheduling/trunk/m/BSDX21.m
r1187 r1472 1 1 BSDX21 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 4/28/11 10:22am 2 ;;1. 6T2;BSDX;;May 16, 20112 ;;1.7T1;BSDX;;Jul 06, 2012;Build 18 3 3 ; Licensed under LGPL 4 4 ; -
Scheduling/trunk/m/BSDX22.m
r1187 r1472 1 1 BSDX22 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 4/28/11 10:22am 2 ;;1. 6T2;BSDX;;May 16, 20112 ;;1.7T1;BSDX;;Jul 06, 2012;Build 18 3 3 ; Licensed under LGPL 4 4 ; -
Scheduling/trunk/m/BSDX23.m
r1187 r1472 1 1 BSDX23 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 4/28/11 10:22am 2 ;;1. 6T2;BSDX;;May 16, 20112 ;;1.7T1;BSDX;;Jul 06, 2012;Build 18 3 3 ; Licensed under LGPL 4 4 ; -
Scheduling/trunk/m/BSDX24.m
r1187 r1472 1 1 BSDX24 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 4/28/11 10:22am 2 ;;1. 6T2;BSDX;;May 16, 20112 ;;1.7T1;BSDX;;Jul 06, 2012;Build 18 3 3 ; Licensed under LGPL 4 4 ; -
Scheduling/trunk/m/BSDX25.m
r1467 r1472 1 1 BSDX25 ; VEN/SMH - WINDOWS SCHEDULING RPCS ; 7/5/12 11:55am 2 ;;1.7T1;BSDX;; Aug 31, 2011;Build 182 ;;1.7T1;BSDX;;Jul 06, 2012;Build 18 3 3 ; Licensed under LGPL 4 4 ; … … 16 16 Q 17 17 ; 18 CHECKIN(BSDXY,BSDXAPPTID,BSDXCDT) 18 CHECKIN(BSDXY,BSDXAPPTID,BSDXCDT) ;Private EP Check in appointment 19 19 ; Old additional vars: ,BSDXCC,BSDXPRV,BSDXROU,BSDXVCL,BSDXVFM,BSDXOG) 20 20 ; Called by RPC: BSDX CHECKIN APPOINTMENT -
Scheduling/trunk/m/BSDX26.m
r1460 r1472 1 1 BSDX26 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 6/25/12 4:29pm 2 ;;1.7T1;BSDX;; Aug 31, 2011;Build 182 ;;1.7T1;BSDX;;Jul 06, 2012;Build 18 3 3 ; Licensed under LGPL 4 4 ; Change History: … … 87 87 QUIT 88 88 ; 89 ROLLBACK(BSDXAPTID) 89 ROLLBACK(BSDXAPTID) ; Rollback note to original in ^BSDXAPPT 90 90 M ^BSDXAPPT(BSDXAPTID)=^TMP($J,"BEFORE","BSDXAPPT") 91 91 K ^TMP($J) -
Scheduling/trunk/m/BSDX27.m
r1187 r1472 1 1 BSDX27 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 4/28/11 10:24am 2 ;;1. 6T2;BSDX;;May 16, 20112 ;;1.7T1;BSDX;;Jul 06, 2012;Build 18 3 3 ; Licensed under LGPL 4 4 ; -
Scheduling/trunk/m/BSDX28.m
r1187 r1472 1 BSDX28 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 4/28/11 10:25am2 ;;1. 6T2;BSDX;;May 16, 20111 BSDX28 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 7/6/12 10:57am 2 ;;1.7T1;BSDX;;Jul 06, 2012;Build 18 3 3 ; Licensed under LGPL 4 4 ; Change Log: … … 38 38 . S BSDXRET=BSDXRET_NAME_U_HRN_U_PID_U_DOB_U_BSDXIEN_$C(30) 39 39 PID ;PID Lookup 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 40 ; If this ID exists, go get it. If "UJOPID" index doesn't exist, 41 ; won't work anyways. 42 I $D(^DPT("UJOPID",BSDXP)) DO SET BSDXY=BSDXRET_$C(31) QUIT 43 . S BSDXIEN=$O(^DPT("UJOPID",BSDXP,"")) 44 . Q:'$D(^DPT(BSDXIEN,0)) 45 . S BSDXDPT=$G(^DPT(BSDXIEN,0)) 46 . S BSDXZ=$P(BSDXDPT,U) ;NAME 47 . S BSDXHRN=$P($G(^AUPNPAT(BSDXIEN,41,DUZ(2),0)),U,2) ;CHART 48 . I BSDXHRN="" Q ;NO CHART AT THIS DUZ2 49 . ; Inactivated Chart get an * 50 . I $P($G(^AUPNPAT(BSDXIEN,41,DUZ(2),0)),U,3) S BSDXHRN=BSDXHRN_"(*)" Q 51 . S $P(BSDXZ,BSDXDLIM,2)=BSDXHRN 52 . S $P(BSDXZ,BSDXDLIM,3)=$P(^DPT(BSDXIEN,.36),U,3) ;PID 53 . S Y=$P(BSDXDPT,U,3) X ^DD("DD") 54 . S $P(BSDXZ,BSDXDLIM,4)=Y ;DOB 55 . S $P(BSDXZ,BSDXDLIM,5)=BSDXIEN 56 . S BSDXRET=BSDXRET_BSDXZ_$C(30) 57 57 ; 58 58 DOB ;DOB Lookup … … 76 76 . Q 77 77 ; 78 CHART 79 ;Chart# Lookup 78 CHART ;Chart# Lookup 80 79 I +DUZ(2),BSDXP]"",$D(^AUPNPAT("D",BSDXP)) D S BSDXY=BSDXRET_$C(31) Q 81 80 . S BSDXIEN=0 F S BSDXIEN=$O(^AUPNPAT("D",BSDXP,BSDXIEN)) Q:'+BSDXIEN I $D(^AUPNPAT("D",BSDXP,BSDXIEN,DUZ(2))) D Q -
Scheduling/trunk/m/BSDX29.m
r1455 r1472 1 1 BSDX29 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 6/22/12 1:46pm 2 ;;1.7T1;BSDX;; Aug 31, 2011;Build 182 ;;1.7T1;BSDX;;Jul 06, 2012;Build 18 3 3 ; Licensed under LGPL 4 4 ; -
Scheduling/trunk/m/BSDX2E.m
r1187 r1472 1 1 BSDX2E ;IHS/OIT/MJL - ENVIRONMENT CHECK FOR WINDOWS SCHEDULING [4/28/11 10:28am] 2 ;;1. 6T2;BSDX;;May 16, 20112 ;;1.7T1;BSDX;;Jul 06, 2012;Build 18 3 3 ; Licensed under LGPL 4 4 ; -
Scheduling/trunk/m/BSDX30.m
r1187 r1472 1 BSDX30 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; [ 4/28/11 10:28am]2 ;;1. 6T2;BSDX;;May 16, 20111 BSDX30 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; [7/6/12 11:03am] 2 ;;1.7T1;BSDX;;Jul 06, 2012;Build 18 3 3 ; Licensed under LGPL 4 4 ; … … 7 7 ;Entry point for debugging 8 8 ; 9 D DEBUG^%Serenji("SPACE^BSDX30(.BSDXY,BSDXDIC,BSDXVAL)")9 ; D DEBUG^%Serenji("SPACE^BSDX30(.BSDXY,BSDXDIC,BSDXVAL)") 10 10 Q 11 11 ; … … 49 49 EHRPTD(BSDXY,BSDXWID,BSDXDFN) ; 50 50 ; 51 D DEBUG^%Serenji("EHRPT^BSDX30(.BSDXY,BSDXWID,BSDXDFN)")51 ; D DEBUG^%Serenji("EHRPT^BSDX30(.BSDXY,BSDXWID,BSDXDFN)") 52 52 Q 53 53 ; … … 70 70 ; 71 71 PEVENT(BSDXWID,DFN) ;EP - Raise patient selection event to EHR 72 ; VEN/SMH v1.7 3120706 - Not used in VISTA. 73 ; No way right now to synchronize with CPRS. 74 ; Code commented out for now. 72 75 ; 73 76 ;Change patient context to patient DFN … … 78 81 ;all EHR client sessions belonging to user DUZ. 79 82 ; 80 Q:'$G(DUZ)83 ;Q:'$G(DUZ) 81 84 ;N X 82 85 ;S X="CIANBUTL" X ^%ZOSF("TEST") Q:'$T 83 86 ;S X="CIANBEVT" X ^%ZOSF("TEST") Q:'$T 84 N UID,BRET85 S BRET=0,UID=086 F S BRET=$$NXTUID^CIANBUTL(.UID,1) Q:'UID D87 . Q:DUZ'=$$GETVAR^CIANBUTL("DUZ",,,UID)88 . I BSDXWID'="" Q:BSDXWID'=$TR($$GETVAR^CIANBUTL("WID",,,UID),"abcdefghijklmnopqrstuvwxyz","ABCDEFGHIJKLMNOPQRSTUVWXYZ")89 . D QUEUE^CIANBEVT("CONTEXT.PATIENT",+DFN,UID)90 Q87 ;N UID,BRET 88 ;S BRET=0,UID=0 89 ;F S BRET=$$NXTUID^CIANBUTL(.UID,1) Q:'UID D 90 ;. Q:DUZ'=$$GETVAR^CIANBUTL("DUZ",,,UID) 91 ;. I BSDXWID'="" Q:BSDXWID'=$TR($$GETVAR^CIANBUTL("WID",,,UID),"abcdefghijklmnopqrstuvwxyz","ABCDEFGHIJKLMNOPQRSTUVWXYZ") 92 ;. D QUEUE^CIANBEVT("CONTEXT.PATIENT",+DFN,UID) 93 ;Q -
Scheduling/trunk/m/BSDX31.m
r1462 r1472 1 1 BSDX31 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 6/27/12 4:57pm 2 ;;1.7T1;BSDX;; Aug 31, 2011;Build 182 ;;1.7T1;BSDX;;Jul 06, 2012;Build 18 3 3 ; Licensed under LGPL 4 4 ; Change Log: … … 121 121 QUIT 122 122 ; 123 BSDXNOS(BSDXAPTID,BSDXNS) 123 BSDXNOS(BSDXAPTID,BSDXNS) ; $$ Private; File/unfile noshow in ^BSDXAPPT 124 124 ; in v1.7 I delete the no-show value rather than file zero 125 125 N BSDXFDA,BSDXIENS,BSDXMSG -
Scheduling/trunk/m/BSDX32.m
r1187 r1472 1 1 BSDX32 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 5/11/11 10:39am 2 ;;1. 6T2;BSDX;;May 16, 20112 ;;1.7T1;BSDX;;Jul 06, 2012;Build 18 3 3 ; Licensed under LGPL 4 4 ; -
Scheduling/trunk/m/BSDX33.m
r1187 r1472 1 1 BSDX33 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 4/28/11 10:29am 2 ;;1. 6T2;BSDX;;May 16, 20112 ;;1.7T1;BSDX;;Jul 06, 2012;Build 18 3 3 ; Licensed under LGPL 4 4 ; Mods by WV/STAR -
Scheduling/trunk/m/BSDX34.m
r1187 r1472 1 1 BSDX34 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 4/28/11 10:29am 2 ;;1. 6T2;BSDX;;May 16, 20112 ;;1.7T1;BSDX;;Jul 06, 2012;Build 18 3 3 ; Licensed under LGPL 4 4 ; -
Scheduling/trunk/m/BSDX35.m
r1454 r1472 1 1 BSDX35 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 6/21/12 3:57pm 2 ;;1.7T1;BSDX;; Aug 31, 2011;Build 182 ;;1.7T1;BSDX;;Jul 06, 2012;Build 18 3 3 ; Licensed under LGPL 4 4 ; -
Scheduling/trunk/m/BSDXAPI.m
r1467 r1472 1 BSDXAPI ; IHS/LJF,HMW,MAW & VEN/SMH - SCHEDULING APIs ; 7/ 5/12 12:52pm2 ;;1.7T1;BSDX;; Aug 31, 2011;Build 181 BSDXAPI ; IHS/LJF,HMW,MAW & VEN/SMH - SCHEDULING APIs ; 7/6/12 10:24am 2 ;;1.7T1;BSDX;;Jul 06, 2012;Build 18 3 3 ; Licensed under LGPL 4 4 ; … … 112 112 ; 113 113 ; Update the Availablilities ; Doesn't fail. Global reads and sets. 114 D AVUPDTMK^BSDXAPI1(BSDR("CLN"),BSDR("ADT"),BSDR("LEN") )114 D AVUPDTMK^BSDXAPI1(BSDR("CLN"),BSDR("ADT"),BSDR("LEN"),BSDR("PAT")) 115 115 ; 116 116 ; call event driver … … 121 121 Q 0 122 122 ; 123 MAKECK(BSDR) 123 MAKECK(BSDR) ; $$ - Is it okay to make an appointment? ; PEP 124 124 ; Input: Same as $$MAKE 125 125 ; Output: 1^error or 0 for success … … 151 151 Q 0 152 152 ; 153 UNMAKE(BSDR) 153 UNMAKE(BSDR) ; Reverse Make - Private $$ 154 154 ; Only used in Emergiencies where Fileman data filing fails. 155 155 ; If previous data exists, which caused an error, it's destroyed. … … 256 256 Q $$CHECKICK(.BSDR) 257 257 ; 258 CHECKICK(BSDR) 258 CHECKICK(BSDR) ; $$ PEP; - Is it okay to check-in patient? 259 259 ; Input: Same as $$CHECKIN 260 260 ; Output: 0 if okay or 1^message if error … … 371 371 Q 0 372 372 ; 373 CANCELCK(BSDR) 373 CANCELCK(BSDR) ; $$ PEP; Okay to Cancel Appointment? 374 374 ; Input: .BSDR array as documented in $$CANCEL 375 375 ; Output: 0 or 1^Error message … … 386 386 NEW IEN S IEN=$$SCIEN(BSDR("PAT"),BSDR("CLN"),BSDR("ADT")) 387 387 I 'IEN Q 1_U_"Error trying to find appointment for cancel: Patient="_BSDR("PAT")_" Clinic="_BSDR("CLN")_" Appt="_BSDR("ADT") 388 Q 0 388 ; 389 ; Check-out check. New in v1.7 390 I $$CO(BSDR("PAT"),BSDR("CLN"),BSDR("ADT"),IEN) Q 1_U_"Cannot delete. Appointment has already been checked-out!" 391 Q 0 392 ; 389 393 CI(PAT,CLINIC,DATE,SDIEN) ;PEP; -- returns 1 if appt already checked-in 390 394 NEW X … … 394 398 Q $S(X:1,1:0) 395 399 ; 400 CO(PAT,CLINIC,DATE,SDIEN) ;PEP; -- returns 1 if appt already checked-out 401 NEW X 402 S X=$G(SDIEN) ;ien sent in call 403 I 'X S X=$$SCIEN(PAT,CLINIC,DATE) I 'X Q 0 404 S X=$P($G(^SC(CLINIC,"S",DATE,1,X,"C")),U,3) 405 Q $S(X:1,1:0) 406 ; 396 407 SCIEN(PAT,CLINIC,DATE) ;PEP; returns ien for appt in ^SC 397 408 NEW X,IEN … … 401 412 Q $G(IEN) 402 413 ; 403 APPLEN(PAT,CLINIC,DATE) 414 APPLEN(PAT,CLINIC,DATE) ; $$ PEP; returns an appointment's length 404 415 ; Get either the appointment length or zero 405 416 ; TODO: Test … … 410 421 NEW X S X=$P($G(^DPT(PAT,"S",DATE,0)),U,7) 411 422 Q $S(X=3:"SCHED",X=4:"WALK-IN",1:"??") 412 ;413 CO(PAT,CLINIC,DATE,SDIEN) ;PEP; -- returns 1 if appt already checked-out414 NEW X415 S X=$G(SDIEN) ;ien sent in call416 I 'X S X=$$SCIEN(PAT,CLINIC,DATE) I 'X Q 0417 S X=$P($G(^SC(CLINIC,"S",DATE,1,X,"C")),U,3)418 Q $S(X:1,1:0)419 423 ; 420 424 UPDATENT(PAT,CLINIC,DATE,NOTE) ; PEP; Update Note in ^SC for patient's appointment @ DATE -
Scheduling/trunk/m/BSDXAPI1.m
r1467 r1472 1 BSDXAPI1 ; VEN/SMH - SCHEDULING APIs - Continued!!! ; 7/5/12 12:55pm2 ;;1.7T1;BSDX;; Aug 31, 2011;Build 181 BSDXAPI1 ; VEN/SMH - SCHEDULING APIs - Continued!!! ; 7/6/12 10:23am 2 ;;1.7T1;BSDX;;Jul 06, 2012;Build 18 3 3 ; Licensed under LGPL 4 4 ; … … 50 50 ; call the EPs here. 51 51 ; 52 NOSHOW(PAT,CLINIC,DATE,NSFLAG) 52 NOSHOW(PAT,CLINIC,DATE,NSFLAG) ; $$ PEP; No-show Patient at appt date (new in v1.7) 53 53 ; PAT = DFN 54 54 ; CLINIC = SC IEN … … 97 97 Q 0 98 98 ; 99 NOSHOWCK(PAT,CLINIC,DATE,NSFLAG) 99 NOSHOWCK(PAT,CLINIC,DATE,NSFLAG) ; $$ PEP; No-show Check 100 100 ; TODO: Not all appointments can be no showed. 101 101 ; Check the code in SDAMN … … 243 243 Q 244 244 ; 245 AVUPDTMK(BSDXSCD,BSDXSTART,BSDXLEN ); Update RPMS Clinic availability for Make245 AVUPDTMK(BSDXSCD,BSDXSTART,BSDXLEN,BSDXPATID) ; Update RPMS Clinic availability for Make 246 246 ;SEE SDM1 247 247 N Y,DFN … … 255 255 S SDDATE=BSDXSTART 256 256 S SDSDATE=SDDATE,SDDATE=SDDATE\1 257 1 257 1 ;L Q:$D(SDXXX) S CCXN=0 K MXOK,COV,SDPROT Q:DFN<0 S SC=+SC 258 258 Q:$D(SDXXX) S CCXN=0 K MXOK,COV,SDPROT Q:DFN<0 S SC=+SC 259 259 S X1=DT,SDEDT=365 S:$D(^SC(SC,"SDP")) SDEDT=$P(^SC(SC,"SDP"),"^",2) -
Scheduling/trunk/m/BSDXGPRV.m
r1187 r1472 1 BSDXGPRV ; WV/SMH - WINDOWS SCHEDULING RPCS ; 4/28/11 10:31am2 ;;1. 6T2;BSDX;;May 16, 20111 BSDXGPRV ; WV/SMH - WINDOWS SCHEDULING RPCS ; 7/6/12 11:07am 2 ;;1.7T1;BSDX;;Jul 06, 2012;Build 18 3 3 ; Licensed under LGPL 4 4 ; … … 18 18 PD(BSDXY,HLIEN) ;EP Debugging entry point 19 19 ; 20 D DEBUG^%Serenji("P^BSDXGPRV(.BSDXY,HLIEN)","192.168.254.130")20 ;D DEBUG^%Serenji("P^BSDXGPRV(.BSDXY,HLIEN)","192.168.254.130") 21 21 ; 22 22 Q … … 33 33 S BSDXI=0 34 34 I '$D(^SC(HLIEN,0)) D ERR("HOSPITAL LOCATION NOT FOUND") QUIT 35 D ^XBKVAR 35 D ^XBKVAR 36 36 N $ET S $ET="G ERROR^BSDXGPRV" 37 37 K ^BSDXTMP($J) -
Scheduling/trunk/m/BSDXUT.m
r1464 r1472 1 BSDXUT 2 ;;1.7T1;BSDX;; Aug 31, 2011;Build 181 BSDXUT ; VEN/SMH - Unit Tests for Scheduling GUI ; 6/29/12 12:20pm 2 ;;1.7T1;BSDX;;Jul 06, 2012;Build 18 3 3 ; Licensed under LGPL 4 4 ; … … 242 242 QUIT 243 243 ; 244 UTCR(RESNAM) 245 246 247 248 249 250 251 252 253 254 255 UTCR44(HLNAME) 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 UTCRRES(NAME,HLIEN) 285 286 287 288 289 290 291 292 293 294 295 TIMES() 296 297 298 299 300 301 302 303 304 305 TIMEHL(HLIEN) 306 307 308 309 244 UTCR(RESNAM) ; $$ - Create Unit Test Clinic and Resource Pair ; Private 245 ; Input: Resource Name By Value 246 ; Output: -1^Error or HLIEN^RESIEN for Success (file 44 IEN^file 9002018.1 IEN) 247 ; DO NOT USE IN A PRODUCTION ENVIRONTMENT. INTENDED FOR TESTING ONLY 248 N HLIEN S HLIEN=$$UTCR44(RESNAM) 249 I +HLIEN=-1 QUIT HLIEN 250 ; 251 N RESIEN S RESIEN=$$UTCRRES(RESNAM,HLIEN) 252 I +RESIEN=-1 QUIT RESIEN 253 E QUIT HLIEN_U_RESIEN 254 ; 255 UTCR44(HLNAME) ; $$ - Create Unit Test Clinic in File 44; Private ; TESTING ONLY CODE 256 ; Output: -1^Error or IEN for Success 257 ; Input: Hosp Location Name by Value 258 ; DO NOT USE IN A PRODUCTION ENVIRONTMENT. INTENDED FOR TESTING ONLY 259 ; 260 I $D(^SC("B",HLNAME)) Q $O(^(HLNAME,"")) 261 ; 262 N SAM 263 S SAM(44,"?+1,",.01)=HLNAME ; Name 264 S SAM(44,"?+1,",2)="C" ; Type = Clinic 265 S SAM(44,"?+1,",2.1)=1 ; Type Extension (not used) 266 S SAM(44,"?+1,",3.5)=$O(^DG(40.8,0)) ; Division (not yet used) 267 S SAM(44,"?+1,",8)=295 ; Stop Code Number (not used) 268 S SAM(44,"?+1,",9)="M" ; Service (not used) 269 S SAM(44,"?+1,",1912)=15 ; Length of Appt (not used) 270 S SAM(44,"?+1,",1917)=4 ; Display increments per hour (not used) 271 S SAM(44,"?+1,",1918)=8 ; Overbooks/day max (not used) 272 S SAM(44,"?+1,",2000.5)=0 ; Require Action Profiles: Yes (not used) 273 S SAM(44,"?+1,",2001)=999 ; Allowable consecutive no-shows (not used) 274 S SAM(44,"?+1,",2002)=999 ; Max # days for Future Booking (not used) 275 S SAM(44,"?+1,",2005)=365 ; Max # days for Auto Rebook (not used) 276 S SAM(44,"?+1,",2502)="N" ; Non-Count Clinic (not used) 277 S SAM(44,"?+1,",2504)="Y" ; Clinic meets at this Facility? (not used) 278 S SAM(44,"?+1,",2507)=9 ; Appointment Type (not used) 279 ; 280 N BSDXERR,BSDXIEN 281 D UPDATE^DIE("",$NA(SAM),$NA(BSDXIEN),$NA(BSDXERR)) 282 Q $S($D(BSDXERR):-1_U_BSDXERR("DIERR",1,"TEXT",1),1:BSDXIEN(1)) 283 ; 284 UTCRRES(NAME,HLIEN) ; $$ - Create Unit Test Resource in 9002018.1 (BSDX RESOURCE); Private 285 ; Input: Hospital Location IEN 286 ; Output: -1^Error or IEN for Success 287 ; DO NOT USE IN A PRODUCTION ENVIRONTMENT. INTENDED FOR TESTING ONLY 288 I $D(^BSDXRES("B",NAME)) Q $O(^(NAME,"")) 289 S HLIEN=$G(HLIEN) ; If we don't send one in 290 N RES ; garbage variable 291 D RSRC^BSDX16(.RES,"|"_NAME_"||"_HLIEN) 292 N RTN S RTN=@$Q(^BSDXTMP($J,0)) ; return array next value 293 Q $S(RTN=0:-1_U_RTN,1:+RTN) ; 0 means an error has occurred; 1 means IEN returned 294 ; 295 TIMES() ; $$ - Create a next available appointment time^ending time; Private 296 ; Output: appttime^endtime 297 N NOW S NOW=$$NOW^XLFDT() ; Now time 298 N LAST S LAST=$O(^BSDXAPPT("B"," "),-1) ; highest time in file 299 N TIME2USE S TIME2USE=$S(NOW>LAST:NOW,1:LAST) ; Which time to use? 300 S TIME2USE=$E(TIME2USE,1,12) ; Strip away seconds 301 N APPTIME S APPTIME=$$FMADD^XLFDT(TIME2USE,0,0,15,0) ; Add 15 min 302 N ENDTIME S ENDTIME=$$FMADD^XLFDT(APPTIME,0,0,15,0) ; Add 15 more min 303 Q APPTIME_U_ENDTIME ; quit with apptime^endtime 304 ; 305 TIMEHL(HLIEN) ; $$ - Create a next available appointment time^ending time by HL; Private 306 ; Input: HLIEN 307 ; Output: Next available appointment time for the HLIEN 308 N LAST S LAST=$O(^SC(HLIEN,"S",""),-1) 309 Q $$FMADD^XLFDT(LAST,1,0,15,0) ; Add 1 day and 15 minutes -
Scheduling/trunk/m/BSDXUT1.m
r1466 r1472 1 BSDXUT1 2 ;;1.7T1;BSDX;; Aug 31, 2011;Build 181 BSDXUT1 ; VEN/SMH - Unit Tests for Scheduling GUI - cont. ; 7/3/12 12:28pm 2 ;;1.7T1;BSDX;;Jul 06, 2012;Build 18 3 3 ; 4 4 ; … … 145 145 QUIT 146 146 ; 147 UT29 147 UT29 ; Unit Test for BSDX29 148 148 ; HLs/Resources are created as part of the UT 149 149 ; Patients 1,2,3,4,5 must exist … … 339 339 QUIT 340 340 ; 341 UT31 341 UT31 ; Unit Tests for BSDX31 342 342 ; Set-up - Create Clinics 343 343 N RESNAM S RESNAM="UTCLINIC" -
Scheduling/trunk/m/BSDXUT2.m
r1467 r1472 1 BSDXUT2 2 ;;1.7T1;BSDX;; Aug 31, 2011;Build 181 BSDXUT2 ; VEN/SMH - Unit Tests for Scheduling GUI - cont. ; 7/5/12 11:39am 2 ;;1.7T1;BSDX;;Jul 06, 2012;Build 18 3 3 ; 4 4 EN ; Run all unit tests in this routine … … 6 6 QUIT 7 7 ; 8 UT25 8 UT25 ; Unit Tests for BSDX25 9 9 ; Make appointment, checkin, then uncheckin 10 10 N $ET S $ET="W ""An Error Occured. Breaking."",! BREAK"
Note:
See TracChangeset
for help on using the changeset viewer.