SDECAPP ;ALB/SAT - VISTA SCHEDULING RPCS ;APR 08, 2016
;;5.3;Scheduling;**642**;Aug 13, 1993;Build 23
;
Q
;
GETYPE(SDECY,SDIEN) ;GET Appointment Type for the given SDEC APPOINTMENT
;INPUT:
; SDIEN - Appointment Id pointer to SDEC APPOINTMENT file 409.84
;RETURN:
; APPTTYPE_IEN ^ APPTTYPE_NAME
N SDTI,SDTN
S SDECY=$NA(^TMP("SDECAPP",$J,"GETYPE"))
K @SDECY
S @SDECY@(0)="T00020APPTTYPE_IEN^T00030APPTTYPE_NAME"_$C(30)
S SDIEN=$G(SDIEN)
I '$D(^SDEC(409.84,+SDIEN,0)) S @SDECY@(1)="-1^Invalid Appointment ID"_$C(30,31) Q
S SDTI=$$GET1^DIQ(409.84,+SDIEN_",",.06,"I")
S SDTN=$$GET1^DIQ(409.84,+SDIEN_",",.06)
S @SDECY@(1)=SDTI_U_SDTN_$C(30,31)
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HSDECAPP 680 printed Nov 22, 2024@18:01:42 Page 2
SDECAPP ;ALB/SAT - VISTA SCHEDULING RPCS ;APR 08, 2016
+1 ;;5.3;Scheduling;**642**;Aug 13, 1993;Build 23
+2 ;
+3 QUIT
+4 ;
GETYPE(SDECY,SDIEN) ;GET Appointment Type for the given SDEC APPOINTMENT
+1 ;INPUT:
+2 ; SDIEN - Appointment Id pointer to SDEC APPOINTMENT file 409.84
+3 ;RETURN:
+4 ; APPTTYPE_IEN ^ APPTTYPE_NAME
+5 NEW SDTI,SDTN
+6 SET SDECY=$NAME(^TMP("SDECAPP",$JOB,"GETYPE"))
+7 KILL @SDECY
+8 SET @SDECY@(0)="T00020APPTTYPE_IEN^T00030APPTTYPE_NAME"_$CHAR(30)
+9 SET SDIEN=$GET(SDIEN)
+10 IF '$DATA(^SDEC(409.84,+SDIEN,0))
SET @SDECY@(1)="-1^Invalid Appointment ID"_$CHAR(30,31)
QUIT
+11 SET SDTI=$$GET1^DIQ(409.84,+SDIEN_",",.06,"I")
+12 SET SDTN=$$GET1^DIQ(409.84,+SDIEN_",",.06)
+13 SET @SDECY@(1)=SDTI_U_SDTN_$CHAR(30,31)
+14 QUIT