Ignore:
Timestamp:
Dec 12, 2010, 11:11:57 AM (13 years ago)
Author:
Sam Habiel
Message:

Updated routines version to 1.42

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Scheduling/trunk/m/BSDXAPI.m

    r1035 r1041  
    1 BSDXAPI ; IHS/ANMC/LJF - SCHEDULING APIs ; 12/6/10 6:01am
    2         ;;1.42;BSDX;;Sep 29, 2010;Build 7
     1BSDXAPI ; IHS/ANMC/LJF - SCHEDULING APIs ; 12/6/10 5:50pm
     2        ;;1.42;BSDX;;Dec 07, 2010;Build 7
    33        ;Orignal routine is BSDAPI by IHS/LJF, HMW, and MAW
    44        ;local mods (many) by WV/SMH
    55        ;Move to BSDX namespace as BSDXAPI from BSDAPI by WV/SMH
    66        ; Change History:
     7           ; 2010-11-5:
    78        ; - Fixed errors having to do uncanceling patient appointments if it was a patient cancelled appointment.
    89        ; - Use new style Fileman API for storing appointments in file 44 in $$MAKE due to problems with legacy API.
    9     ; 2010-11-12:
    10     ; - Changed ="C" to ["C" in SCIEN. Cancelled appointments can be "PC" as well.
    11     ; 2010-12-5
    12     ; Added an entry point to update the patient note in file 44.
    13     ; 2010-12-6
    14     ; MAKE1 incorrectly put info field in BSDR("INFO") rather than BSDR("OI")
     10           ; 2010-11-12:
     11           ; - Changed ="C" to ["C" in SCIEN. Cancelled appointments can be "PC" as well.
     12           ; 2010-12-5
     13           ; Added an entry point to update the patient note in file 44.
     14           ; 2010-12-6
     15           ; MAKE1 incorrectly put info field in BSDR("INFO") rather than BSDR("OI")
     16           ; 2010-12-8
     17           ; Removed restriction on max appt length. Even though this restriction
     18           ; exists in fileman (120 minutes), PIMS ignores it. Therefore, I
     19           ; will ignore it here too.
    1520        ;
    1621MAKE1(DFN,CLIN,TYP,DATE,LEN,INFO)       ; Simplified PEP w/ parameters for $$MAKE - making appointment
     
    5156        I $G(BSDR("ADT"))'?7N1".".4N Q 1_U_"Appt Date/Time error: "_$G(BSDR("ADT"))
    5257        ;
    53         I ($G(BSDR("LEN"))<5)!($G(BSDR("LEN"))>240) Q 1_U_"Appt Length error: "_$G(BSDR("LEN"))
     58        ;I ($G(BSDR("LEN"))<5)!($G(BSDR("LEN"))>240) Q 1_U_"Appt Length error: "_$G(BSDR("LEN")) ; v 1.42 - no check on length is done anymore. see top comments for details.
    5459        I '$D(^VA(200,+$G(BSDR("USR")),0)) Q 1_U_"User Who Made Appt Error: "_$G(BSDR("USR"))
    5560        I $D(^DPT(BSDR("PAT"),"S",BSDR("ADT"),0)),$P(^(0),U,2)'["C" Q 1_U_"Patient "_BSDR("PAT")_" already has appt at "_BSDR("ADT")
     
    280285        Q $S(X:1,1:0)
    281286        ;
    282 UPDATENOTE(PAT,CLINIC,DATE,NOTE) ; PEP; Update Note in ^SC for patient's appointment @ DATE
    283     ; PAT = DFN
    284     ; CLINIC = SC IEN
    285     ; DATE = FM Date/Time of Appointment
    286     ;
    287     ; Returns:
    288     ; 0 if okay
    289     ; -1 if failure
    290     N SCIEN S SCIEN=$$SCIEN(PAT,CLINIC,DATE) ; ien of appt in ^SC
    291     I SCIEN<1 QUIT 0    ; Appt cancelled; cancelled appts rm'ed from file 44
    292     N BSDXIENS S BSDXIENS=SCIEN_","_DATE_","_CLINIC_","
    293     S BSDXFDA(44.003,BSDXIENS,3)=$E(NOTE,1,150)
    294     N BSDXERR
    295     D FILE^DIE("","BSDXFDA","BSDXERR")
    296     I $D(BSDXERR) QUIT "-1~Can't file for Pat "_PAT_" in Clinic "_CLINIC_" at "_DATE_". Fileman reported an error: "_BSDXERR("DIERR",1,"TEXT",1)
    297     QUIT 0
     287UPDATENOTE(PAT,CLINIC,DATE,NOTE)        ; PEP; Update Note in ^SC for patient's appointment @ DATE
     288           ; PAT = DFN
     289           ; CLINIC = SC IEN
     290           ; DATE = FM Date/Time of Appointment
     291           ;
     292           ; Returns:
     293           ; 0 if okay
     294           ; -1 if failure
     295           N SCIEN S SCIEN=$$SCIEN(PAT,CLINIC,DATE) ; ien of appt in ^SC
     296           I SCIEN<1 QUIT 0    ; Appt cancelled; cancelled appts rm'ed from file 44
     297           N BSDXIENS S BSDXIENS=SCIEN_","_DATE_","_CLINIC_","
     298           S BSDXFDA(44.003,BSDXIENS,3)=$E(NOTE,1,150)
     299           N BSDXERR
     300           D FILE^DIE("","BSDXFDA","BSDXERR")
     301           I $D(BSDXERR) QUIT "-1~Can't file for Pat "_PAT_" in Clinic "_CLINIC_" at "_DATE_". Fileman reported an error: "_BSDXERR("DIERR",1,"TEXT",1)
     302           QUIT 0
Note: See TracChangeset for help on using the changeset viewer.