Changeset 867 for Scheduling/trunk
- Timestamp:
- Jul 14, 2010, 8:08:39 AM (14 years ago)
- Location:
- Scheduling/trunk/m
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Scheduling/trunk/m/BSDX07.m
r863 r867 1 BSDX07 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; ; 7/6/10 6:13am1 BSDX07 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; ; 7/6/10 4:28pm 2 2 ;;2.0;IHS WINDOWS SCHEDULING;;NOV 01, 2007 3 3 ; v1.3 July 13 2010 - Add support i18n - Dates input as FM dates, not US. … … 111 111 ;Returns ien in BSDXAPPT or 0 if failed 112 112 ;Create entry in BSDX APPOINTMENT 113 ; BSDXSTART and BSDXEND need to be stored as numeric, not string 114 ; So 3090713.0900 is incorrect --> it should be 3090713.09 113 115 N BSDXAPPTID 114 S BSDXFDA(9002018.4,"+1,",.01)= BSDXSTART115 S BSDXFDA(9002018.4,"+1,",.02)= BSDXEND116 S BSDXFDA(9002018.4,"+1,",.01)=+BSDXSTART ; smh fix bug stores as string 117 S BSDXFDA(9002018.4,"+1,",.02)=+BSDXEND 116 118 S BSDXFDA(9002018.4,"+1,",.05)=BSDXPATID 117 119 S BSDXFDA(9002018.4,"+1,",.07)=BSDXRESD -
Scheduling/trunk/m/BSDX28.m
r614 r867 1 BSDX28 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 1 BSDX28 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; 7/6/10 3:55pm 2 2 ;;2.0;IHS WINDOWS SCHEDULING;;NOV 01, 2007 3 3 ; 4 ;HMW 20050721 Added test for inactivated record 4 ; HMW 3050721 Added test for inactivated record 5 ; SMH 3100714 add PID search, return PID instead of SSN 6 ; Change Error trap to new style. 5 7 ; 6 8 PTLOOKRS(BSDXY,BSDXP,BSDXC) ;EP Patient Lookup 7 9 ; 8 10 ;Find up to BSDXC patients matching BSDXP* 9 ;Supports DOB Lookup, SSN Lookup11 ;Supports DOB Lookup, Primary Long ID lookup 10 12 ; 11 S X="ERROR^BSDX28",@^%ZOSF("TRAP") 13 N $ET S $ET="G ERROR^BSDX28" 14 ; rm ctrl chars 12 15 S BSDXP=$TR(BSDXP,$C(13),"") 13 16 S BSDXP=$TR(BSDXP,$C(10),"") 14 17 S BSDXP=$TR(BSDXP,$C(9),"") 18 ; num of pts to find 15 19 S:BSDXC="" BSDXC=10 16 20 N BSDXHRN,BSDXZ,BSDXDLIM,BSDXRET,BSDXDPT,BSDXRET,BSDXIEN,BSDXFILE … … 18 22 N BSDXTARG,BSDXMSG,BSDXRSLT 19 23 S BSDXDLIM="^" 20 S BSDXRET="T00030NAME^T00030HRN^T00030 SSN^D00030DOB^T00030IEN"_$C(30)24 S BSDXRET="T00030NAME^T00030HRN^T00030PID^D00030DOB^T00030IEN"_$C(30) 21 25 I '+$G(DUZ) S BSDXY=BSDXRET_$C(31) Q 22 26 I '$D(DUZ(2)) S BSDXY=BSDXRET_$C(31) Q 27 28 PID ;PID Lookup 29 ; If this ID exists, go get it. If "UJOPID" index doesn't exist, 30 ; won't work anyways. 31 I $D(^DPT("UJOPID",BSDXP)) DO SET BSDXY=BSDXRET_$C(31) QUIT 32 . S BSDXIEN=$O(^DPT("UJOPID",BSDXP,"")) 33 . Q:'$D(^DPT(BSDXIEN,0)) 34 . S BSDXDPT=$G(^DPT(BSDXIEN,0)) 35 . S BSDXZ=$P(BSDXDPT,U) ;NAME 36 . S BSDXHRN=$P($G(^AUPNPAT(BSDXIEN,41,DUZ(2),0)),U,2) ;CHART 37 . I BSDXHRN="" Q ;NO CHART AT THIS DUZ2 38 . ; Inactivated Chart get an * 39 . I $P($G(^AUPNPAT(BSDXIEN,41,DUZ(2),0)),U,3) S BSDXHRN=BSDXHRN_"(*)" Q 40 . S $P(BSDXZ,BSDXDLIM,2)=BSDXHRN 41 . S $P(BSDXZ,BSDXDLIM,3)=$P(^DPT(BSDXIEN,.36),U,3) ;PID 42 . S Y=$P(BSDXDPT,U,3) X ^DD("DD") 43 . S $P(BSDXZ,BSDXDLIM,4)=Y ;DOB 44 . S $P(BSDXZ,BSDXDLIM,5)=BSDXIEN 45 . S BSDXRET=BSDXRET_BSDXZ_$C(30) 23 46 ; 24 47 DOB ;DOB Lookup … … 34 57 . . I $P($G(^AUPNPAT(BSDXIEN,41,DUZ(2),0)),U,3) S BSDXHRN=BSDXHRN_"(*)" Q ;HMW 20050721 Record Inactivated 35 58 . . S $P(BSDXZ,BSDXDLIM,2)=BSDXHRN 36 . . S $P(BSDXZ,BSDXDLIM,3)=$P(BSDXDPT,U,9) ;SSN 59 . . S $P(BSDXZ,BSDXDLIM,3)=$P(^DPT(BSDXIEN,.36),U,3) ;PID 37 60 . . S Y=$P(BSDXDPT,U,3) X ^DD("DD") 38 61 . . S $P(BSDXZ,BSDXDLIM,4)=Y ;DOB … … 42 65 . Q 43 66 ; 44 ;Chart# Lookup 67 CHART 68 ;Chart# Lookup 45 69 I +DUZ(2),BSDXP]"",$D(^AUPNPAT("D",BSDXP)) D S BSDXY=BSDXRET_$C(31) Q 46 70 . S BSDXIEN=0 F S BSDXIEN=$O(^AUPNPAT("D",BSDXP,BSDXIEN)) Q:'+BSDXIEN I $D(^AUPNPAT("D",BSDXP,BSDXIEN,DUZ(2))) D Q … … 51 75 . . I $D(^AUPNPAT(BSDXIEN,41,DUZ(2),0)),$P(^(0),U,3) S BSDXHRN=BSDXHRN_"(*)" Q ;HMW 20050721 Record Inactivated 52 76 . . S $P(BSDXZ,BSDXDLIM,2)=BSDXHRN 53 . . S $P(BSDXZ,BSDXDLIM,3)=$P(BSDXDPT,U,9) ;SSN 77 . . S $P(BSDXZ,BSDXDLIM,3)=$P(^DPT(BSDXIEN,.36),U,3) ;PID 54 78 . . S Y=$P(BSDXDPT,U,3) X ^DD("DD") 55 79 . . S $P(BSDXZ,BSDXDLIM,4)=Y ;DOB … … 58 82 . . Q 59 83 . Q 60 61 ;SSN Lookup84 ; 85 SSN ;SSN Lookup 62 86 I (BSDXP?9N)!(BSDXP?3N1"-"2N1"-"4N),$D(^DPT("SSN",BSDXP)) D S BSDXY=BSDXRET_$C(31) Q 63 87 . S BSDXIEN=0 F S BSDXIEN=$O(^DPT("SSN",BSDXP,BSDXIEN)) Q:'+BSDXIEN D Q … … 69 93 . . I $P($G(^AUPNPAT(BSDXIEN,41,DUZ(2),0)),U,3) S BSDXHRN=BSDXHRN_"(*)" Q ;HMW 20050721 Record Inactivated 70 94 . . S $P(BSDXZ,BSDXDLIM,2)=BSDXHRN 71 . . S $P(BSDXZ,BSDXDLIM,3)=$P(BSDXDPT,U,9) ;SSN 95 . . S $P(BSDXZ,BSDXDLIM,3)=$P(^DPT(BSDXIEN,.36),U,3) ;PID 72 96 . . S Y=$P(BSDXDPT,U,3) X ^DD("DD") 73 97 . . S $P(BSDXZ,BSDXDLIM,4)=Y ;DOB … … 99 123 . S $P(BSDXZ,BSDXDLIM,2)=BSDXHRN 100 124 . S BSDXDPT=$G(^DPT(BSDXIEN,0)) 101 . S $P(BSDXZ,BSDXDLIM,3)=$P(BSDXDPT,U,9) ;SSN 125 . S $P(BSDXZ,BSDXDLIM,3)=$P(^DPT(BSDXIEN,.36),U,3) ;PID 102 126 . S Y=$P(BSDXDPT,U,3) X ^DD("DD") 103 127 . S $P(BSDXZ,BSDXDLIM,4)=Y ;DOB
Note:
See TracChangeset
for help on using the changeset viewer.