more i18n work

This commit is contained in:
sam 2010-07-13 13:04:57 +00:00
parent 83367ff7de
commit afe56d8b84
4 changed files with 50 additions and 37 deletions

View File

@ -1,5 +1,6 @@
BSDX07 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; ; 6/7/10 2:19pm
BSDX07 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; ; 7/6/10 6:13am
;;2.0;IHS WINDOWS SCHEDULING;;NOV 01, 2007
; v1.3 July 13 2010 - Add support i18n - Dates input as FM dates, not US.
;
;
APPADDD(BSDXY,BSDXSTART,BSDXEND,BSDXPATID,BSDXRES,BSDXLEN,BSDXNOTE,BSDXATID) ;EP
@ -23,7 +24,7 @@ APPADD(BSDXY,BSDXSTART,BSDXEND,BSDXPATID,BSDXRES,BSDXLEN,BSDXNOTE,BSDXATID) ;EP
; AppointmentID and ErrorNumber
;
;Test lines:
ENDBG ;BSDX ADD NEW APPOINTMENT^12-28-2000@0900^12-28-2000@1000^370^2^PEDIATRICIAN,DEMO^EXAM^SCRATCH NOTE
ENDBG ;BSDX ADD NEW APPOINTMENT^3091122.0930^3091122.1000^370^2^PEDIATRICIAN,DEMO^EXAM^SCRATCH NOTE
;
N BSDXERR,BSDXIEN,BSDXDEP,BSDXI,BSDXJ,BSDXAPPTI,BSDXDJ,BSDXRESD,BSDXRNOD,BSDXSCD,BSDXC,BSDXERR,BSDXWKIN
N BSDXNOEV
@ -40,13 +41,14 @@ ENDBG ;BSDX ADD NEW APPOINTMENT^12-28-2000@0900^12-28-2000@1000^370^2^PEDIATRICI
L +^BSDXAPPT(BSDXPATID):5 I '$T D ERR(BSDXI+1,"Another user is working with this patient's record. Please try again later") Q
;
TSTART
; v1.3 - date passed in as FM Date, not US date.
;Check input data for errors
S:BSDXSTART["@0000" BSDXSTART=$P(BSDXSTART,"@")
S:BSDXEND["@0000" BSDXEND=$P(BSDXEND,"@")
S %DT="T",X=BSDXSTART D ^%DT S BSDXSTART=Y
I BSDXSTART=-1 D ERR(BSDXI+1,"BSDX07 Error: Invalid Start Time") Q
S %DT="T",X=BSDXEND D ^%DT S BSDXEND=Y
I BSDXEND=-1 D ERR(BSDXI+1,"BSDX07 Error: Invalid End Time") Q
; S:BSDXSTART["@0000" BSDXSTART=$P(BSDXSTART,"@")
; S:BSDXEND["@0000" BSDXEND=$P(BSDXEND,"@")
; S %DT="T",X=BSDXSTART D ^%DT S BSDXSTART=Y
; I BSDXSTART=-1 D ERR(BSDXI+1,"BSDX07 Error: Invalid Start Time") Q
; S %DT="T",X=BSDXEND D ^%DT S BSDXEND=Y
; I BSDXEND=-1 D ERR(BSDXI+1,"BSDX07 Error: Invalid End Time") Q
I $L(BSDXEND,".")=1 D ERR(BSDXI+1,"BSDX07 Error: Invalid End Time") Q
I BSDXSTART>BSDXEND S BSDXTMP=BSDXEND,BSDXEND=BSDXSTART,BSDXSTART=BSDXTMP
I '+BSDXPATID,'$D(^DPT(BSDXPATID,0)) D ERR(BSDXI+1,"BSDX07 Error: Invalid Patient ID") Q

View File

@ -1,5 +1,7 @@
BSDX12 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ;
;;2.0;IHS WINDOWS SCHEDULING;;NOV 01, 2007
BSDX12 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 7/6/10 6:33am
;;1.3;IHS WINDOWS SCHEDULING;;NOV 01, 2007
; v 1.3 - i18n support
; BSDXSTART and BSDXEND passed in FM Dates, not US dates
;
;
AVADD(BSDXY,BSDXSTART,BSDXEND,BSDXTYPID,BSDXRES,BSDXSLOTS,BSDXNOTE) ;EP
@ -11,8 +13,8 @@ AVADD(BSDXY,BSDXSTART,BSDXEND,BSDXTYPID,BSDXRES,BSDXSLOTS,BSDXNOTE) ;EP
; AvailabilityID and ErrorNumber
;
;Test lines:
;D AVADD^BSDX12(.RES,"1-27-2001@0900","1-27-2001@1000","1","WHITT",2,"SCRATCH AV NOTE") ZW RES
;BSDX ADD NEW AVAILABILITY^1-27-2001@0900^1-278-2001@1000^1^WHITT^2^SCRATCH AVAILABILITY NOTE
;D AVADD^BSDX12(.RES,"3091227.09","3091227.0930","1","WHITT",2,"SCRATCH AV NOTE") ZW RES
;BSDX ADD NEW AVAILABILITY^3091227.09^3091227.0930^1^WHITT^2^SCRATCH AVAILABILITY NOTE
;
N BSDXERR,BSDXIEN,BSDXDEP,BSDXI,BSDXAVID,BSDXI,BSDXERR,BSDXFDA,BSDXMSG,BSDXRESD
K ^BSDXTMP($J)
@ -21,12 +23,13 @@ AVADD(BSDXY,BSDXSTART,BSDXEND,BSDXTYPID,BSDXRES,BSDXSLOTS,BSDXNOTE) ;EP
S BSDXY="^BSDXTMP("_$J_")"
S ^BSDXTMP($J,0)="I00020AVAILABILITYID^I00020ERRORID"_$C(30)
;Check input data for errors
S:BSDXSTART["@0000" BSDXSTART=$P(BSDXSTART,"@")
S:BSDXEND["@0000" BSDXEND=$P(BSDXEND,"@")
S %DT="T",X=BSDXSTART D ^%DT S BSDXSTART=Y
I BSDXSTART=-1 D ERR(70) Q
S %DT="T",X=BSDXEND D ^%DT S BSDXEND=Y
I BSDXEND=-1 D ERR(70) Q
; i18n - FM Dates passed in
; S:BSDXSTART["@0000" BSDXSTART=$P(BSDXSTART,"@")
; S:BSDXEND["@0000" BSDXEND=$P(BSDXEND,"@")
; S %DT="T",X=BSDXSTART D ^%DT S BSDXSTART=Y
; I BSDXSTART=-1 D ERR(70) Q
; S %DT="T",X=BSDXEND D ^%DT S BSDXEND=Y
; I BSDXEND=-1 D ERR(70) Q
I $L(BSDXEND,".")=1 D ERR(70) Q
I BSDXSTART>BSDXEND S BSDXTMP=BSDXEND,BSDXEND=BSDXSTART,BSDXSTART=BSDXTMP
;Validate Access Type

View File

@ -1,5 +1,6 @@
BSDX13 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ;
;;2.0;IHS WINDOWS SCHEDULING;;NOV 01, 2007
BSDX13 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 7/6/10 7:24am
;;1.3;IHS WINDOWS SCHEDULING;;NOV 01, 2007
; V 1.3 - i18n support - Dates passed to Routine as FM Date
;
;
Q
@ -14,7 +15,7 @@ AVDELDT(BSDXY,BSDXRESD,BSDXSTART,BSDXEND) ;EP
;Called by BSDX CANCEL AV BY DATE
;
;BSDXRESD is BSDX RESOURCE ien
;BSDXSTART and BSDXEND are external dates
;BSDXSTART and BSDXEND are FM dates (change in v 1.3)
;
S X="ERROR^BSDX13",@^%ZOSF("TRAP")
N BMXIEN,BSDXI
@ -22,13 +23,13 @@ AVDELDT(BSDXY,BSDXRESD,BSDXSTART,BSDXEND) ;EP
S BSDXY="^BSDXTMP("_$J_")"
K ^BSDXTMP($J)
S ^BSDXTMP($J,BSDXI)="I00020ERRORID^T00030ERRORTEXT"_$C(30)
S X=BSDXSTART
S %DT="X" D ^%DT
I Y=-1 D ERR(0,"AVDELDT-BSDX13: Invalid Start Date") Q
S BSDXSTART=$P(Y,".")
S X=BSDXEND
S %DT="X" D ^%DT
I Y=-1 D ERR(0,"AVDELDT-BSDX13: Invalid End Date") Q
; S X=BSDXSTART ; commented out *v1.3
; S %DT="X" D ^%DT
; I Y=-1 D ERR(0,"AVDELDT-BSDX13: Invalid Start Date") Q
; S BSDXSTART=$P(Y,".")
; S X=BSDXEND
; S %DT="X" D ^%DT
; I Y=-1 D ERR(0,"AVDELDT-BSDX13: Invalid End Date") Q
S BSDXEND=$P(Y,".")_".99999"
I '+BSDXRESD D ERR(0,"AVDELDT-BSDX13: Invalid Resource ID") Q
;

View File

@ -1,6 +1,10 @@
BSDX33 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 7/11/10 11:38am
;;2.0;IHS WINDOWS SCHEDULING;;NOV 01, 2007
BSDX33 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 7/6/10 8:43am
;;1.3;IHS WINDOWS SCHEDULING;;NOV 01, 2007
; Mods by WV/STAR
;
; July 13, 2010
; v 1.3 adds fixes Rebooking behavior in application
; also adds i18 support - Dates passed in FM format from application
;
;
Q
@ -12,7 +16,7 @@ RBNEXTD(BSDXY,BSDXDATE,BSDXRES,BSDXTPID) ;EP
;
RBNEXT(BSDXY,BSDXDATE,BSDXRES,BSDXTPID) ;EP
;Called by BSDX REBOOK NEXT BLOCK to find
;the next ACCESS BLOCK in resource BSDXRES after BSDXSTART
;the next ACCESS BLOCK in resource BSDXRES after BSDXDATE
;Returns 1 in ERRORID and date in NEXTBLOCK if a block was found or NULL in NEXTBLOCK of no date found
;Otherwise, returns 0 and error message in ERRORTEXT
;If BSDXTPID = 0 then any access type match
@ -27,9 +31,11 @@ RBNEXT(BSDXY,BSDXDATE,BSDXRES,BSDXTPID) ;EP
I '$D(^BSDXRES("B",BSDXRES)) D ERR2("BSDX REBOOK NEXT BLOCK: Invalid resource name") Q
S BSDXRESD=$O(^BSDXRES("B",BSDXRES,0))
I '+BSDXRESD D ERR2("BSDX REBOOK NEXT BLOCK: Invalid resource name") Q
S X=BSDXDATE,%DT="XT" D ^%DT
I Y=-1 D ERR2(1,"BSDX REBOOK NEXT BLOCK: Invalid datetime") Q
S BSDXDATE=$P(Y,".")
;
; S X=BSDXDATE,%DT="XT" D ^%DT
; I Y=-1 D ERR2(1,"BSDX REBOOK NEXT BLOCK: Invalid datetime") Q
;
; S BSDXDATE=$P(Y,".")
;
S BSDXFND=0
F S BSDXDATE=$O(^BSDXAB("ARSCT",BSDXRESD,BSDXDATE)) Q:'+BSDXDATE D Q:BSDXFND
@ -73,9 +79,10 @@ SETRBK(BSDXY,BSDXAPPT,BSDXDATE) ;EP
;
I '+BSDXAPPT
I '$D(^BSDXAPPT(BSDXAPPT,0)) D ERR(1,"BSDX REBOOK SET: Invalid appointment ID") Q
S X=BSDXDATE,%DT="XT" D ^%DT
I Y=-1 D ERR(1,"BSDX REBOOK SET: Invalid rebook datetime") Q
S BSDXDATE=Y
; i18n (v 1.3)
;S X=BSDXDATE,%DT="XT" D ^%DT
;I Y=-1 D ERR(1,"BSDX REBOOK SET: Invalid rebook datetime") Q
;S BSDXDATE=Y
S BSDXIENS=BSDXAPPT_","
S BSDXFDA(9002018.4,BSDXIENS,.11)=BSDXDATE
;