Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: SDES2BLDAPPT44

SDES2BLDAPPT44.m

Go to the documentation of this file.
  1. SDES2BLDAPPT44 ;ALB/LAB,TJB,LAB,JAS,JDJ - VISTA SCHEDULING BUILDING APPT OBJECT FOR CLINIC ;OCT 24, 2024
  1. ;;5.3;Scheduling;**871,877,880,887,895**;Aug 13, 1993;Build 11
  1. ;;Per VHA Directive 6402, this routine should not be modified
  1. ;
  1. Q
  1. ;
  1. GET44INFO(APPTOBJ,CLINIEN,RECCNT) ;
  1. N CLINIENS,ARRAY44
  1. S CLINIENS=CLINIEN_","
  1. D GETS^DIQ(44,CLINIENS,".01;3.5;8;10;20;21;60;62;63;99;99.1;200;2500;2503","IE","ARRAY44","SDMSG")
  1. S APPTOBJ("Appointment",RECCNT,"Clinic","CreditStopCodeAMIS")=$$GET1^DIQ(40.7,$G(ARRAY44(44,CLINIENS,2503,"I")),1,"I")
  1. S APPTOBJ("Appointment",RECCNT,"Clinic","CreditStopCodeName")=$G(ARRAY44(44,CLINIENS,2503,"E"))
  1. S APPTOBJ("Appointment",RECCNT,"Clinic","DisplayClinicAppt")=$G(ARRAY44(44,CLINIENS,62,"E"))
  1. S APPTOBJ("Appointment",RECCNT,"Clinic","Division")=$G(ARRAY44(44,CLINIENS,3.5,"E"))
  1. S APPTOBJ("Appointment",RECCNT,"Clinic","ECheckinAllowed")=$G(ARRAY44(44,CLINIENS,20,"E"))
  1. S APPTOBJ("Appointment",RECCNT,"Clinic","Name")=$G(ARRAY44(44,CLINIENS,.01,"E"))
  1. S APPTOBJ("Appointment",RECCNT,"Clinic","PatientFriendlyName")=$G(ARRAY44(44,CLINIENS,60,"E"))
  1. S APPTOBJ("Appointment",RECCNT,"Clinic","PbspID")=$G(ARRAY44(44,CLINIENS,200,"E"))
  1. S APPTOBJ("Appointment",RECCNT,"Clinic","PhysicalLocation")=$G(ARRAY44(44,CLINIENS,10,"E"))
  1. S APPTOBJ("Appointment",RECCNT,"Clinic","PreCheckinAllowed")=$G(ARRAY44(44,CLINIENS,21,"E"))
  1. S APPTOBJ("Appointment",RECCNT,"Clinic","StopCodeAMIS")=$$GET1^DIQ(40.7,$G(ARRAY44(44,CLINIENS,8,"I")),1,"I")
  1. S APPTOBJ("Appointment",RECCNT,"Clinic","StopCodeName")=$G(ARRAY44(44,CLINIENS,8,"E"))
  1. S APPTOBJ("Appointment",RECCNT,"Clinic","Telephone")=$G(ARRAY44(44,CLINIENS,99,"E"))
  1. S APPTOBJ("Appointment",RECCNT,"Clinic","TelephoneExtension")=$G(ARRAY44(44,CLINIENS,99.1,"E"))
  1. S APPTOBJ("Appointment",RECCNT,"Clinic","StationNumber")=$$STATIONNUMBER^SDESUTIL($G(CLINIEN))
  1. S APPTOBJ("Appointment",RECCNT,"Clinic","ProhibitedClinic")=$S($G(ARRAY44(44,CLINIENS,2500,"E"))="YES":1,1:0)
  1. S APPTOBJ("Appointment",RECCNT,"Clinic","VeteranSelfCancel")=$G(ARRAY44(44,CLINIENS,63,"E"))
  1. D GETTIMEZONEINFO(.APPTOBJ,CLINIENS,RECCNT,.ARRAY44)
  1. Q
  1. ;
  1. GETTIMEZONEINFO(APPTOBJ,CLINIENA,RECCNT,ARRAY44) ;
  1. N DIVISION,INSTITUTION,TIMEZONEIEN,TIMEZONELOOP,TIMEZONECOUNT,TIMEZONEIEN,TIMEZONEDATA,TZIENS
  1. S DIVISION=$G(ARRAY44(44,CLINIENS,3.5,"I"))
  1. S INSTITUTION=$$GET1^DIQ(40.8,DIVISION,.07,"I")
  1. S TIMEZONEIEN=$$GET1^DIQ(4,INSTITUTION,800,"I")
  1. I TIMEZONEIEN="" D BLANKTIMEZONE(.APPTOBJ,RECCNT) Q
  1. S APPTOBJ("Appointment",RECCNT,"Clinic","TimeZone")=$$GET1^DIQ(4,INSTITUTION,800,"E")
  1. S APPTOBJ("Appointment",RECCNT,"Clinic","TimeZoneException")=$$GET1^DIQ(4,INSTITUTION,802,"E")
  1. S (TIMEZONELOOP,TIMEZONECOUNT)=0 F S TIMEZONELOOP=$O(^DIT(1.71,TIMEZONEIEN,1,TIMEZONELOOP)) Q:'TIMEZONELOOP D
  1. .S TZIENS=TIMEZONELOOP_","_TIMEZONEIEN_","
  1. .D GETS^DIQ(1.711,TZIENS,"**","IE","TIMEZONEDATA")
  1. .S TIMEZONECOUNT=TIMEZONECOUNT+1
  1. .S APPTOBJ("Appointment",RECCNT,"Clinic","TimeZoneDetails",TIMEZONECOUNT,"TimeFrame")=$G(TIMEZONEDATA(1.711,TZIENS,.01,"E"))
  1. .S APPTOBJ("Appointment",RECCNT,"Clinic","TimeZoneDetails",TIMEZONECOUNT,"Offset")=$G(TIMEZONEDATA(1.711,TZIENS,.02,"E"))
  1. .S APPTOBJ("Appointment",RECCNT,"Clinic","TimeZoneDetails",TIMEZONECOUNT,"TimeZoneCode")=$G(TIMEZONEDATA(1.711,TZIENS,.03,"E"))
  1. Q
  1. ;
  1. BLANKTIMEZONE(APPTOBJ,RECCNT) ;
  1. S APPTOBJ("Appointment",RECCNT,"Clinic","TimeZone")=""
  1. S APPTOBJ("Appointment",RECCNT,"Clinic","TimeZoneException")=""
  1. S APPTOBJ("Appointment",RECCNT,"Clinic","TimeZoneDetails",1)=""
  1. Q
  1. ;
  1. GET44003INFO(APPTOBJ,CLINIEN,SDIEN,RECCNT) ; Build appointment object for HOSPITAL LOCATION appointemnt multiple.
  1. N ARRAY44003,SDMSG
  1. D GETS^DIQ(44.003,SDIEN,"1.6;1.7;2;3;4;6;9;10;10.5;30;200;302;304;306;310;400;688;999","IE","ARRAY44003","SDMSG")
  1. S APPTOBJ("Appointment",RECCNT,"AppointmentCancelled")=$G(ARRAY44003(44.003,SDIEN,310,"E"))
  1. S APPTOBJ("Appointment",RECCNT,"CheckInUser")=$G(ARRAY44003(44.003,SDIEN,302,"E"))
  1. S APPTOBJ("Appointment",RECCNT,"CheckOutEntered")=$$FMTISO^SDAMUTDT(ARRAY44003(44.003,SDIEN,306,"I"))
  1. S APPTOBJ("Appointment",RECCNT,"CheckOutUser")=$G(ARRAY44003(44.003,SDIEN,304,"E"))
  1. S APPTOBJ("Appointment",RECCNT,"ConsultLink")=$G(ARRAY44003(44.003,SDIEN,688,"I"))
  1. S APPTOBJ("Appointment",RECCNT,"DuplicateApptSameDay")=$G(ARRAY44003(44.003,SDIEN,999,"I"))
  1. S APPTOBJ("Appointment",RECCNT,"OtherTests")=$G(ARRAY44003(44.003,SDIEN,3,"I"))
  1. S APPTOBJ("Appointment",RECCNT,"OtherTravel")=$G(ARRAY44003(44.003,SDIEN,6,"I"))
  1. S APPTOBJ("Appointment",RECCNT,"OverbookFlag")=$G(ARRAY44003(44.003,SDIEN,9,"I"))
  1. S APPTOBJ("Appointment",RECCNT,"ParentRecordRequest")=$G(ARRAY44003(44.003,SDIEN,200,"E"))
  1. S APPTOBJ("Appointment",RECCNT,"Patient","CurrentEligibilityCode")=$G(ARRAY44003(44.003,SDIEN,10.5,"E"))
  1. S APPTOBJ("Appointment",RECCNT,"Patient","EligibilityOfVisit")=$G(ARRAY44003(44.003,SDIEN,30,"E"))
  1. S APPTOBJ("Appointment",RECCNT,"Patient","EnrollmentCode")=$G(ARRAY44003(44.003,SDIEN,1.6,"I"))
  1. S APPTOBJ("Appointment",RECCNT,"Patient","EnrollmentDate")=$$FMTISO^SDAMUTDT($G(ARRAY44003(44.003,SDIEN,1.7,"I")))
  1. S APPTOBJ("Appointment",RECCNT,"PriorXRayResults")=$G(ARRAY44003(44.003,SDIEN,10,"I"))
  1. S APPTOBJ("Appointment",RECCNT,"VeteranVideoCallURL")=$G(ARRAY44003(44.003,SDIEN,400,"I"))
  1. S APPTOBJ("Appointment",RECCNT,"WardLocation")=$G(ARRAY44003(44.003,SDIEN,4,"I"))
  1. S APPTOBJ("Appointment",RECCNT,"XRAY")=$G(ARRAY44003(44.003,SDIEN,2,"I"))
  1. S APPTOBJ("Appointment",RECCNT,"Clinic","IsOverbook")=$S($G(ARRAY44003(44.003,SDIEN,9,"I"))="O":1,1:0)
  1. Q
  1. ;
  1. BLANK44003INFO(APPTOBJ,RECCNT) ;
  1. ;If Appointment multiple for the hospital location is not pressent, send blanks
  1. S APPTOBJ("Appointment",RECCNT,"AppointmentCancelled")=""
  1. S APPTOBJ("Appointment",RECCNT,"CheckInUser")=""
  1. S APPTOBJ("Appointment",RECCNT,"CheckOutEntered")=""
  1. S APPTOBJ("Appointment",RECCNT,"CheckOutUser")=""
  1. S APPTOBJ("Appointment",RECCNT,"ConsultLink")=""
  1. S APPTOBJ("Appointment",RECCNT,"DuplicateApptSameDay")=""
  1. S APPTOBJ("Appointment",RECCNT,"OtherTests")=""
  1. S APPTOBJ("Appointment",RECCNT,"OtherTravel")=""
  1. S APPTOBJ("Appointment",RECCNT,"OverbookFlag")=""
  1. S APPTOBJ("Appointment",RECCNT,"ParentRecordRequest")=""
  1. S APPTOBJ("Appointment",RECCNT,"Patient","CurrentEligibilityCode")=""
  1. S APPTOBJ("Appointment",RECCNT,"Patient","EligibilityOfVisit")=""
  1. S APPTOBJ("Appointment",RECCNT,"Patient","EnrollmentCode")=""
  1. S APPTOBJ("Appointment",RECCNT,"Patient","EnrollmentDate")=""
  1. S APPTOBJ("Appointment",RECCNT,"PriorXRayResults")=""
  1. S APPTOBJ("Appointment",RECCNT,"VeteranVideoCallURL")=""
  1. S APPTOBJ("Appointment",RECCNT,"WardLocation")=""
  1. S APPTOBJ("Appointment",RECCNT,"XRAY")=""
  1. S APPTOBJ("Appointment",RECCNT,"Clinic","IsOverbook")=""
  1. Q
  1. ;