. . . S SDDATE=0 F S SDDATE=$O(^TMP($J,"SDAMA301",SDCLIEN,SDDFN,SDDATE)) Q:SDDATE="" D . . . . S SDSTATUS=$P($G(^TMP($J,"SDAMA301",100,501,SDDATE)),"^",3) ;appointment status continue processing this appointment as needed I SDCOUNT<0 D do processing for errors 101 and 116 when finished with all processing, kill output array and user-defined patient list I SDCOUNT'=0 K ^TMP($J,"SDAMA301") K ^SDDFN SDAPI - Data Fields Available Appointment Data Fields: Table 36: Available Appointment Data Fields ID FIELD NAME DATA Format/Valid Description Examples of TYPE Values Returned Data 1 The scheduled 3031215.113 M Appointment 3031201.0815 DATE/TIME Date/Time 2 CLINIC IEN TEXT ID^name Clinic IEN and 150;CARDIOLOGY and NAME name 32;BLOOD DONOR 3 TEXT R The status of the R;SCHEDULED/KEPT STATUS (Scheduled/Kept) appointment. I;INPATIENT I (Inpatient) NS;N0-SHOW NS (No-Show) NSR;NO-SHOW & NSR (No-Show, RESCHEDULED Rescheduled) CP;CANCELLED BY CP (Cancelled by PATIENT Patient) CPR;CANCELLED BY CPR (Cancelled PATIENT & by Patient, RESCHEDULED Rescheduled) CC;CANCELLED BY CC (Cancelled CLINIC by Clinic) CCR;CANCELLED BY CCR (Cancelled CLINIC & by Clinic, RESCHEDULED Rescheduled)
. . . S SDDATE=0 F S SDDATE=$O(^TMP($J,"SDAMA301",SDCLIEN,SDDFN,SDDATE)) Q:SDDATE="" D . . . . S SDSTATUS=$P($G(^TMP($J,"SDAMA301",100,501,SDDATE)),"^",3) ;appointment status continue processing this appointment as needed I SDCOUNT<0 D do processing for errors 101 and 116 when finished with all processing, kill output array and user-defined patient list I SDCOUNT'=0 K ^TMP($J,"SDAMA301") K ^SDDFN SDAPI - Data Fields Available Appointment Data Fields: Table 36: Available Appointment Data Fields ID FIELD NAME DATA TYPE Format/Valid Values Description Examples of Returned Data 1 DATE/TIME The scheduled Appointment Date/Time 3031215.113 3031201.0815 2 CLINIC IEN and NAME TEXT ID^name Clinic IEN and name 150;CARDIOLOGY 32;BLOOD DONOR 3 STATUS TEXT R (Scheduled/Kept) I (Inpatient) NS (No-Show) NSR (No-Show, Rescheduled) CP (Cancelled by Patient) CPR (Cancelled by Patient, Rescheduled) CC (Cancelled by Clinic) CCR (Cancelled by Clinic, Rescheduled) The status of the appointment. R;SCHEDULED/KEPT I;INPATIENT NS;N0-SHOW NSR;NO-SHOW & RESCHEDULED CP;CANCELLED BY PATIENT CPR;CANCELLED BY PATIENT & RESCHEDULED CC;CANCELLED BY CLINIC CCR;CANCELLED BY CLINIC & RESCHEDULED M