Changeset 1472 for Scheduling


Ignore:
Timestamp:
Jul 6, 2012, 2:28:15 PM (12 years ago)
Author:
Sam Habiel
Message:

Updated version number on all routines to be 1.7T1.
Minor fixes here and there for XINDEX errors.

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:46pm
    2         ;;1.6T2;BSDX;;May 16, 2011
     1BSDX01  ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 7/6/12 10:52am
     2        ;;1.7T1;BSDX;;Jul 06, 2012;Build 18
    33        ; Licensed under LGPL
    44        ;
     
    282282        ;
    283283INDIV(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
    295294INDIV2(BSDXRES) ; PEP - Is Resource in the same DUZ(2) as user?
    296            ; Input BSDXRES - BSDX RESOURCE IEN
    297            ; Output: True of False
    298            Q $$INDIV($P($G(^BSDXRES(BSDXRES,0)),U,4)) ; Extract Hospital Location and send to $$INDIV
    299 UnitTestINDIV   
    300            W "Testing if they are the same",!
    301            S DUZ(2)=67
    302            I '$$INDIV(1) W "ERROR",!
    303            I '$$INDIV(2) W "ERROR",!
    304            W "Testing if Div not defined in 44, should be true",!
    305            I '$$INDIV(3) W "ERROR",!
    306            W "Testing empty string. Should be true",!
    307            I '$$INDIV("") W "ERROR",!
    308            W "Testing if they are different",!
    309            S DUZ(2)=899
    310            I $$INDIV(1) W "ERROR",!
    311            I $$INDIV(2) W "ERROR",!
    312            QUIT
    313 UnitTestINDIV2 
    314            W "Testing if they are the same",!
    315            S DUZ(2)=69
    316            I $$INDIV2(22)'=0 W "ERROR",!
    317            I $$INDIV2(25)'=1 W "ERROR",!
    318            I $$INDIV2(26)'=1 W "ERROR",!
    319            I $$INDIV2(27)'=1 W "ERROR",!
    320            QUIT
    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
     298UTINDIV ; 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
     312UTINDIV2 ; 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        ;
    322321GETRADEX(BSDXY,DFN,SCIEN)       ; Get All Pending and On Hold Radiology Exams for Patient; RPC EP; UJO/SMH new in v 1.6
    323322        ; 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:47pm
    2         ;;1.6T2;BSDX;;May 16, 2011
     1BSDX02  ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 7/6/12 11:09am
     2        ;;1.7T1;BSDX;;Jul 06, 2012;Build 18
    33        ;Licensed under LGPL
    44        ; Change Log
     
    3030        S BSDXERR=""
    3131        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)
    3334        D ^XBKVAR S X="ETRAP^BSDX02",@^%ZOSF("TRAP")
    3435        ;
     
    3738        ; S %DT="T",X=BSDXEND D ^%DT S BSDXEND=Y
    3839        ; I BSDXEND=-1 S ^BSDXTMP($J,1)=$C(31) Q
    39            ;
     40        ;
    4041        S BSDXI=0
    4142        D STRES
  • Scheduling/trunk/m/BSDX03.m

    r1187 r1472  
    11BSDX03  ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 4/28/11 10:14am
    2         ;;1.6T2;BSDX;;May 16, 2011
     2        ;;1.7T1;BSDX;;Jul 06, 2012;Build 18
    33        ;Licensed under LGPL
    44        ;
  • Scheduling/trunk/m/BSDX04.m

    r1187 r1472  
    1 BSDX04  ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ;  ; 4/28/11 10:15am
    2         ;;1.6T2;BSDX;;May 16, 2011
     1BSDX04  ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ;  ; 7/6/12 10:55am
     2        ;;1.7T1;BSDX;;Jul 06, 2012;Build 18
    33        ; Licensed under LGPL
    44        ; Change Log:
     
    7474        . Q:BSDXRESN=""
    7575        . Q:'$D(^BSDXRES("B",BSDXRESN))
    76         . S BSDXRESD=$O(^BSDXRES("B",BSDXRESN,0)) 
     76        . S BSDXRESD=$O(^BSDXRES("B",BSDXRESN,0))
    7777        . Q:'+BSDXRESD
    7878        . Q:'$D(^BSDXAB("ARSCT",BSDXRESD))
  • Scheduling/trunk/m/BSDX05.m

    r1187 r1472  
    11BSDX05   ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 4/28/11 10:16am
    2            ;;1.6T2;BSDX;;May 16, 2011
     2           ;;1.7T1;BSDX;;Jul 06, 2012;Build 18
    33           ; Licensed under LGPL
    44           ;
  • Scheduling/trunk/m/BSDX06.m

    r1187 r1472  
    11BSDX06  ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 4/28/11 10:16am
    2         ;;1.6T2;BSDX;;May 16, 2011
     2        ;;1.7T1;BSDX;;Jul 06, 2012;Build 18
    33        ; Licensed under LGPL
    44        ; Change Log:
  • Scheduling/trunk/m/BSDX07.m

    r1467 r1472  
    11BSDX07  ; VW/UJO/SMH - WINDOWS SCHEDULING RPCS  ; 7/5/12 12:57pm
    2         ;;1.7T1;BSDX;;Aug 31, 2011;Build 18
     2        ;;1.7T1;BSDX;;Jul 06, 2012;Build 18
    33        ; Licensed under LGPL
    44        ;
     
    6666        ; Deal with optional arguments
    6767        S BSDXRADEXAM=$G(BSDXRADEXAM)
    68     ;
     68           ;
    6969        ; Return Array; set Return and clear array
    7070        S BSDXY=$NA(^BSDXTMP($J))
    7171        K ^BSDXTMP($J)
    72     ;
     72           ;
    7373        ; $ET
    7474        N $ET S $ET="G ETRAP^BSDX07"
     
    238238        Q
    239239        ;
    240 ROLLBACK(BSDXAPPTID,BSDXC) ; Private EP; Roll back appointment set
     240ROLLBACK(BSDXAPPTID,BSDXC)      ; Private EP; Roll back appointment set
    241241        ; DO NOT USE except as an emergency measure - only if unforseen error occurs
    242242        ; Input:
  • Scheduling/trunk/m/BSDX08.m

    r1467 r1472  
    11BSDX08  ; VW/UJO/SMH - WINDOWS SCHEDULING RPCS ; 7/5/12 12:39pm
    2         ;;1.7T1;BSDX;;Aug 31, 2011;Build 18
     2        ;;1.7T1;BSDX;;Jul 06, 2012;Build 18
    33        ;
    44        ; Original by HMW. New Written by Sam Habiel. Licensed under LGPL.
     
    152152        QUIT 0
    153153        ;
    154 ROLLBACK(BSDXAPTID)  ; Proc; Private; Rollback cancellation
     154ROLLBACK(BSDXAPTID)      ; Proc; Private; Rollback cancellation
    155155        ; Input same as $$BSDXCAN
    156156        N BSDXIENS S BSDXIENS=BSDXAPTID_","
  • Scheduling/trunk/m/BSDX09.m

    r1452 r1472  
    1 BSDX09  ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ;  ; 4/28/11 10:18am
    2         ;;1.6;BSDX;;Aug 31, 2011;Build 18
     1BSDX09  ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ;  ; 6/21/12 11:03am
     2        ;;1.7T1;BSDX;;Jul 06, 2012;Build 18
    33        ; Licensed under LGPL
    44        ;
  • Scheduling/trunk/m/BSDX11.m

    r1187 r1472  
    11BSDX11  ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 4/28/11 10:18am
    2         ;;1.6T2;BSDX;;May 16, 2011
     2        ;;1.7T1;BSDX;;Jul 06, 2012;Build 18
    33        ; Licensed under LGPL
    44        ;
  • Scheduling/trunk/m/BSDX12.m

    r1187 r1472  
    11BSDX12  ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 4/28/11 10:18am
    2         ;;1.6T2;BSDX;;May 16, 2011
     2        ;;1.7T1;BSDX;;Jul 06, 2012;Build 18
    33        ; Licensed under LGPL
    44        ;
  • Scheduling/trunk/m/BSDX13.m

    r1187 r1472  
    11BSDX13  ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 4/28/11 10:19am
    2         ;;1.6T2;BSDX;;May 16, 2011
     2        ;;1.7T1;BSDX;;Jul 06, 2012;Build 18
    33        ; Licensed under LGPL
    44        ;
  • Scheduling/trunk/m/BSDX14.m

    r1187 r1472  
    11BSDX14  ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 4/28/11 10:19am
    2         ;;1.6T2;BSDX;;May 16, 2011
     2        ;;1.7T1;BSDX;;Jul 06, 2012;Build 18
    33        ; Licensed under LGPL
    44        ;
  • Scheduling/trunk/m/BSDX15.m

    r1187 r1472  
    11BSDX15  ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 4/28/11 10:19am
    2         ;;1.6T2;BSDX;;May 16, 2011
     2        ;;1.7T1;BSDX;;Jul 06, 2012;Build 18
    33        ; Licensed under LGPL
    44        ;
  • Scheduling/trunk/m/BSDX16.m

    r1187 r1472  
    11BSDX16  ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ;  ; 4/28/11 10:20am
    2         ;;1.6T2;BSDX;;May 16, 2011
     2        ;;1.7T1;BSDX;;Jul 06, 2012;Build 18
    33        ; Licensed under LGPL
    44        ;
  • Scheduling/trunk/m/BSDX17.m

    r1187 r1472  
    11BSDX17  ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 4/28/11 10:20am
    2         ;;1.6T2;BSDX;;May 16, 2011
     2        ;;1.7T1;BSDX;;Jul 06, 2012;Build 18
    33        ; Licensed under LGPL
    44        ;
  • Scheduling/trunk/m/BSDX18.m

    r1187 r1472  
    11BSDX18  ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 4/28/11 10:20am
    2         ;;1.6T2;BSDX;;May 16, 2011
     2        ;;1.7T1;BSDX;;Jul 06, 2012;Build 18
    33        ; Licensed under LGPL
    44        ;
  • Scheduling/trunk/m/BSDX19.m

    r1187 r1472  
    11BSDX19  ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 4/28/11 10:21am
    2         ;;1.6T2;BSDX;;May 16, 2011
     2        ;;1.7T1;BSDX;;Jul 06, 2012;Build 18
    33        ; Licensed under LGPL
    44        ;
  • Scheduling/trunk/m/BSDX20.m

    r1187 r1472  
    11BSDX20  ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 4/28/11 10:21am
    2         ;;1.6T2;BSDX;;May 16, 2011
     2        ;;1.7T1;BSDX;;Jul 06, 2012;Build 18
    33        ; Licensed under LGPL
    44        ;
  • Scheduling/trunk/m/BSDX21.m

    r1187 r1472  
    11BSDX21  ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 4/28/11 10:22am
    2         ;;1.6T2;BSDX;;May 16, 2011
     2        ;;1.7T1;BSDX;;Jul 06, 2012;Build 18
    33        ; Licensed under LGPL
    44        ;
  • Scheduling/trunk/m/BSDX22.m

    r1187 r1472  
    11BSDX22  ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 4/28/11 10:22am
    2         ;;1.6T2;BSDX;;May 16, 2011
     2        ;;1.7T1;BSDX;;Jul 06, 2012;Build 18
    33        ; Licensed under LGPL
    44        ;
  • Scheduling/trunk/m/BSDX23.m

    r1187 r1472  
    11BSDX23  ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 4/28/11 10:22am
    2         ;;1.6T2;BSDX;;May 16, 2011
     2        ;;1.7T1;BSDX;;Jul 06, 2012;Build 18
    33        ; Licensed under LGPL
    44        ;
  • Scheduling/trunk/m/BSDX24.m

    r1187 r1472  
    11BSDX24  ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 4/28/11 10:22am
    2         ;;1.6T2;BSDX;;May 16, 2011
     2        ;;1.7T1;BSDX;;Jul 06, 2012;Build 18
    33        ; Licensed under LGPL
    44        ;
  • Scheduling/trunk/m/BSDX25.m

    r1467 r1472  
    11BSDX25  ; VEN/SMH - WINDOWS SCHEDULING RPCS ; 7/5/12 11:55am
    2         ;;1.7T1;BSDX;;Aug 31, 2011;Build 18
     2        ;;1.7T1;BSDX;;Jul 06, 2012;Build 18
    33        ; Licensed under LGPL
    44        ;
     
    1616        Q
    1717        ;
    18 CHECKIN(BSDXY,BSDXAPPTID,BSDXCDT) ;Private EP Check in appointment
     18CHECKIN(BSDXY,BSDXAPPTID,BSDXCDT)       ;Private EP Check in appointment
    1919        ; Old additional vars: ,BSDXCC,BSDXPRV,BSDXROU,BSDXVCL,BSDXVFM,BSDXOG)
    2020        ; Called by RPC: BSDX CHECKIN APPOINTMENT
  • Scheduling/trunk/m/BSDX26.m

    r1460 r1472  
    11BSDX26   ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 6/25/12 4:29pm
    2         ;;1.7T1;BSDX;;Aug 31, 2011;Build 18
     2        ;;1.7T1;BSDX;;Jul 06, 2012;Build 18
    33        ; Licensed under LGPL
    44        ; Change History:
     
    8787        QUIT
    8888        ;
    89 ROLLBACK(BSDXAPTID) ; Rollback note to original in ^BSDXAPPT
     89ROLLBACK(BSDXAPTID)     ; Rollback note to original in ^BSDXAPPT
    9090        M ^BSDXAPPT(BSDXAPTID)=^TMP($J,"BEFORE","BSDXAPPT")
    9191        K ^TMP($J)
  • Scheduling/trunk/m/BSDX27.m

    r1187 r1472  
    11BSDX27   ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 4/28/11 10:24am
    2            ;;1.6T2;BSDX;;May 16, 2011
     2           ;;1.7T1;BSDX;;Jul 06, 2012;Build 18
    33           ; Licensed under LGPL
    44           ;
  • Scheduling/trunk/m/BSDX28.m

    r1187 r1472  
    1 BSDX28  ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 4/28/11 10:25am
    2         ;;1.6T2;BSDX;;May 16, 2011
     1BSDX28  ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 7/6/12 10:57am
     2        ;;1.7T1;BSDX;;Jul 06, 2012;Build 18
    33        ; Licensed under LGPL
    44        ; Change Log:
     
    3838        . S BSDXRET=BSDXRET_NAME_U_HRN_U_PID_U_DOB_U_BSDXIEN_$C(30)
    3939PID     ;PID Lookup
    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)
     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)
    5757        ;
    5858DOB     ;DOB Lookup
     
    7676        . Q
    7777        ;
    78 CHART   
    79            ;Chart# Lookup
     78CHART ;Chart# Lookup
    8079        I +DUZ(2),BSDXP]"",$D(^AUPNPAT("D",BSDXP)) D  S BSDXY=BSDXRET_$C(31) Q
    8180        . 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  
    11BSDX29  ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 6/22/12 1:46pm
    2         ;;1.7T1;BSDX;;Aug 31, 2011;Build 18
     2        ;;1.7T1;BSDX;;Jul 06, 2012;Build 18
    33        ; Licensed under LGPL
    44        ;
  • Scheduling/trunk/m/BSDX2E.m

    r1187 r1472  
    11BSDX2E  ;IHS/OIT/MJL - ENVIRONMENT CHECK FOR WINDOWS SCHEDULING [4/28/11 10:28am]
    2         ;;1.6T2;BSDX;;May 16, 2011
     2        ;;1.7T1;BSDX;;Jul 06, 2012;Build 18
    33        ; Licensed under LGPL
    44        ;
  • 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, 2011
     1BSDX30  ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; [7/6/12 11:03am]
     2        ;;1.7T1;BSDX;;Jul 06, 2012;Build 18
    33        ; Licensed under LGPL
    44        ;
     
    77        ;Entry point for debugging
    88        ;
    9         D DEBUG^%Serenji("SPACE^BSDX30(.BSDXY,BSDXDIC,BSDXVAL)")
     9        ; D DEBUG^%Serenji("SPACE^BSDX30(.BSDXY,BSDXDIC,BSDXVAL)")
    1010        Q
    1111        ;
     
    4949EHRPTD(BSDXY,BSDXWID,BSDXDFN)   ;
    5050        ;
    51         D DEBUG^%Serenji("EHRPT^BSDX30(.BSDXY,BSDXWID,BSDXDFN)")
     51        ; D DEBUG^%Serenji("EHRPT^BSDX30(.BSDXY,BSDXWID,BSDXDFN)")
    5252        Q
    5353        ;
     
    7070        ;
    7171PEVENT(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.
    7275        ;
    7376        ;Change patient context to patient DFN
     
    7881        ;all EHR client sessions belonging to user DUZ.
    7982        ;
    80         Q:'$G(DUZ)
     83        ;Q:'$G(DUZ)
    8184        ;N X
    8285        ;S X="CIANBUTL" X ^%ZOSF("TEST") Q:'$T
    8386        ;S X="CIANBEVT" X ^%ZOSF("TEST") Q:'$T
    84         N UID,BRET
    85         S BRET=0,UID=0
    86         F  S BRET=$$NXTUID^CIANBUTL(.UID,1) Q:'UID  D
    87         . 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         Q
     87        ;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  
    11BSDX31   ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 6/27/12 4:57pm
    2         ;;1.7T1;BSDX;;Aug 31, 2011;Build 18
     2        ;;1.7T1;BSDX;;Jul 06, 2012;Build 18
    33        ; Licensed under LGPL
    44        ; Change Log:
     
    121121        QUIT
    122122        ;
    123 BSDXNOS(BSDXAPTID,BSDXNS) ; $$ Private; File/unfile noshow in ^BSDXAPPT
     123BSDXNOS(BSDXAPTID,BSDXNS)       ; $$ Private; File/unfile noshow in ^BSDXAPPT
    124124        ; in v1.7 I delete the no-show value rather than file zero
    125125        N BSDXFDA,BSDXIENS,BSDXMSG
  • Scheduling/trunk/m/BSDX32.m

    r1187 r1472  
    11BSDX32  ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 5/11/11 10:39am
    2         ;;1.6T2;BSDX;;May 16, 2011
     2        ;;1.7T1;BSDX;;Jul 06, 2012;Build 18
    33        ; Licensed under LGPL
    44        ;
  • Scheduling/trunk/m/BSDX33.m

    r1187 r1472  
    11BSDX33  ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 4/28/11 10:29am
    2         ;;1.6T2;BSDX;;May 16, 2011
     2        ;;1.7T1;BSDX;;Jul 06, 2012;Build 18
    33        ; Licensed under LGPL
    44        ; Mods by WV/STAR
  • Scheduling/trunk/m/BSDX34.m

    r1187 r1472  
    11BSDX34  ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 4/28/11 10:29am
    2         ;;1.6T2;BSDX;;May 16, 2011
     2        ;;1.7T1;BSDX;;Jul 06, 2012;Build 18
    33        ; Licensed under LGPL 
    44        ;
  • Scheduling/trunk/m/BSDX35.m

    r1454 r1472  
    11BSDX35  ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 6/21/12 3:57pm
    2         ;;1.7T1;BSDX;;Aug 31, 2011;Build 18
     2        ;;1.7T1;BSDX;;Jul 06, 2012;Build 18
    33        ; Licensed under LGPL 
    44        ;
  • Scheduling/trunk/m/BSDXAPI.m

    r1467 r1472  
    1 BSDXAPI ; IHS/LJF,HMW,MAW & VEN/SMH - SCHEDULING APIs ; 7/5/12 12:52pm
    2         ;;1.7T1;BSDX;;Aug 31, 2011;Build 18
     1BSDXAPI ; IHS/LJF,HMW,MAW & VEN/SMH - SCHEDULING APIs ; 7/6/12 10:24am
     2        ;;1.7T1;BSDX;;Jul 06, 2012;Build 18
    33        ; Licensed under LGPL 
    44        ;
     
    112112        ;
    113113        ; 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"))
    115115        ;
    116116        ; call event driver
     
    121121        Q 0
    122122        ;
    123 MAKECK(BSDR) ; $$ - Is it okay to make an appointment? ; PEP
     123MAKECK(BSDR)    ; $$ - Is it okay to make an appointment? ; PEP
    124124        ; Input: Same as $$MAKE
    125125        ; Output: 1^error or 0 for success
     
    151151        Q 0
    152152        ;
    153 UNMAKE(BSDR) ; Reverse Make - Private $$
     153UNMAKE(BSDR)    ; Reverse Make - Private $$
    154154        ; Only used in Emergiencies where Fileman data filing fails.
    155155        ; If previous data exists, which caused an error, it's destroyed.
     
    256256        Q $$CHECKICK(.BSDR)
    257257        ;
    258 CHECKICK(BSDR) ; $$ PEP; - Is it okay to check-in patient?
     258CHECKICK(BSDR)  ; $$ PEP; - Is it okay to check-in patient?
    259259        ; Input: Same as $$CHECKIN
    260260        ; Output: 0 if okay or 1^message if error
     
    371371        Q 0
    372372        ;
    373 CANCELCK(BSDR) ; $$ PEP; Okay to Cancel Appointment?
     373CANCELCK(BSDR)  ; $$ PEP; Okay to Cancel Appointment?
    374374        ; Input: .BSDR array as documented in $$CANCEL
    375375        ; Output: 0 or 1^Error message
     
    386386        NEW IEN S IEN=$$SCIEN(BSDR("PAT"),BSDR("CLN"),BSDR("ADT"))
    387387        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        ;
    389393CI(PAT,CLINIC,DATE,SDIEN)       ;PEP; -- returns 1 if appt already checked-in
    390394        NEW X
     
    394398        Q $S(X:1,1:0)
    395399        ;
     400CO(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        ;
    396407SCIEN(PAT,CLINIC,DATE)  ;PEP; returns ien for appt in ^SC
    397408        NEW X,IEN
     
    401412        Q $G(IEN)
    402413        ;
    403 APPLEN(PAT,CLINIC,DATE) ; $$ PEP; returns an appointment's length
     414APPLEN(PAT,CLINIC,DATE) ; $$ PEP; returns an appointment's length
    404415        ; Get either the appointment length or zero
    405416        ; TODO: Test
     
    410421        NEW X S X=$P($G(^DPT(PAT,"S",DATE,0)),U,7)
    411422        Q $S(X=3:"SCHED",X=4:"WALK-IN",1:"??")
    412         ;
    413 CO(PAT,CLINIC,DATE,SDIEN)       ;PEP; -- returns 1 if appt already checked-out
    414         NEW X
    415         S X=$G(SDIEN)   ;ien sent in call
    416         I 'X S X=$$SCIEN(PAT,CLINIC,DATE) I 'X Q 0
    417         S X=$P($G(^SC(CLINIC,"S",DATE,1,X,"C")),U,3)
    418         Q $S(X:1,1:0)
    419423        ;
    420424UPDATENT(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:55pm
    2         ;;1.7T1;BSDX;;Aug 31, 2011;Build 18
     1BSDXAPI1        ; VEN/SMH - SCHEDULING APIs - Continued!!! ; 7/6/12 10:23am
     2        ;;1.7T1;BSDX;;Jul 06, 2012;Build 18
    33        ; Licensed under LGPL 
    44        ;
     
    5050        ; call the EPs here.
    5151        ;
    52 NOSHOW(PAT,CLINIC,DATE,NSFLAG) ; $$ PEP; No-show Patient at appt date (new in v1.7)
     52NOSHOW(PAT,CLINIC,DATE,NSFLAG)  ; $$ PEP; No-show Patient at appt date (new in v1.7)
    5353        ; PAT = DFN
    5454        ; CLINIC = SC IEN
     
    9797        Q 0
    9898        ;
    99 NOSHOWCK(PAT,CLINIC,DATE,NSFLAG) ; $$ PEP; No-show Check
     99NOSHOWCK(PAT,CLINIC,DATE,NSFLAG)        ; $$ PEP; No-show Check
    100100        ; TODO: Not all appointments can be no showed.
    101101        ; Check the code in SDAMN
     
    243243        Q
    244244        ;
    245 AVUPDTMK(BSDXSCD,BSDXSTART,BSDXLEN) ; Update RPMS Clinic availability for Make
     245AVUPDTMK(BSDXSCD,BSDXSTART,BSDXLEN,BSDXPATID)   ; Update RPMS Clinic availability for Make
    246246        ;SEE SDM1
    247247        N Y,DFN
     
    255255        S SDDATE=BSDXSTART
    256256        S SDSDATE=SDDATE,SDDATE=SDDATE\1
    257 1 ;L  Q:$D(SDXXX)  S CCXN=0 K MXOK,COV,SDPROT Q:DFN<0  S SC=+SC
     2571       ;L  Q:$D(SDXXX)  S CCXN=0 K MXOK,COV,SDPROT Q:DFN<0  S SC=+SC
    258258        Q:$D(SDXXX)  S CCXN=0 K MXOK,COV,SDPROT Q:DFN<0  S SC=+SC
    259259        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:31am
    2         ;;1.6T2;BSDX;;May 16, 2011
     1BSDXGPRV        ; WV/SMH - WINDOWS SCHEDULING RPCS ; 7/6/12 11:07am
     2        ;;1.7T1;BSDX;;Jul 06, 2012;Build 18
    33        ; Licensed under LGPL 
    44        ;
     
    1818PD(BSDXY,HLIEN) ;EP Debugging entry point
    1919        ;
    20         D DEBUG^%Serenji("P^BSDXGPRV(.BSDXY,HLIEN)","192.168.254.130")
     20        ;D DEBUG^%Serenji("P^BSDXGPRV(.BSDXY,HLIEN)","192.168.254.130")
    2121        ;
    2222        Q
     
    3333        S BSDXI=0
    3434        I '$D(^SC(HLIEN,0)) D ERR("HOSPITAL LOCATION NOT FOUND") QUIT
    35         D ^XBKVAR 
     35        D ^XBKVAR
    3636        N $ET S $ET="G ERROR^BSDXGPRV"
    3737        K ^BSDXTMP($J)
  • Scheduling/trunk/m/BSDXUT.m

    r1464 r1472  
    1 BSDXUT ; VEN/SMH - Unit Tests for Scheduling GUI ; 6/29/12 12:20pm
    2         ;;1.7T1;BSDX;;Aug 31, 2011;Build 18
     1BSDXUT  ; VEN/SMH - Unit Tests for Scheduling GUI ; 6/29/12 12:20pm
     2        ;;1.7T1;BSDX;;Jul 06, 2012;Build 18
    33        ; Licensed under LGPL
    44        ;
     
    242242        QUIT
    243243        ;
    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
     244UTCR(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        ;
     255UTCR44(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        ;
     284UTCRRES(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        ;
     295TIMES() ; $$ - 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        ;
     305TIMEHL(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 ; VEN/SMH - Unit Tests for Scheduling GUI - cont. ; 7/3/12 12:28pm
    2         ;;1.7T1;BSDX;;Aug 31, 2011;Build 18
     1BSDXUT1 ; VEN/SMH - Unit Tests for Scheduling GUI - cont. ; 7/3/12 12:28pm
     2        ;;1.7T1;BSDX;;Jul 06, 2012;Build 18
    33        ;
    44        ;
     
    145145        QUIT
    146146        ;
    147 UT29 ; Unit Test for BSDX29
     147UT29    ; Unit Test for BSDX29
    148148        ; HLs/Resources are created as part of the UT
    149149        ; Patients 1,2,3,4,5 must exist
     
    339339        QUIT
    340340        ;
    341 UT31 ; Unit Tests for BSDX31
     341UT31    ; Unit Tests for BSDX31
    342342        ; Set-up - Create Clinics
    343343        N RESNAM S RESNAM="UTCLINIC"
  • Scheduling/trunk/m/BSDXUT2.m

    r1467 r1472  
    1 BSDXUT2 ; VEN/SMH - Unit Tests for Scheduling GUI - cont. ; 7/5/12 11:39am
    2         ;;1.7T1;BSDX;;Aug 31, 2011;Build 18
     1BSDXUT2 ; VEN/SMH - Unit Tests for Scheduling GUI - cont. ; 7/5/12 11:39am
     2        ;;1.7T1;BSDX;;Jul 06, 2012;Build 18
    33        ;
    44EN      ; Run all unit tests in this routine
     
    66        QUIT
    77        ;
    8 UT25 ; Unit Tests for BSDX25
     8UT25    ; Unit Tests for BSDX25
    99        ; Make appointment, checkin, then uncheckin
    1010        N $ET S $ET="W ""An Error Occured. Breaking."",! BREAK"
Note: See TracChangeset for help on using the changeset viewer.