Exemple #1
0
        public XRefArray getXRefs(string siteId, string fileNumber)
        {
            MySession newSession = new MySession();

            return((XRefArray)QueryTemplate.getQuery(QueryType.STATELESS, siteId).execute
                       (newSession, new Func <string, XRefArray>(new ToolsLib(newSession).getXRefs), new object[] { fileNumber }));
        }
Exemple #2
0
        public VistaFileTO getFile(string siteId, string fileNumber, bool includeXRefs)
        {
            MySession newSession = new MySession();

            return((VistaFileTO)QueryTemplate.getQuery(QueryType.STATELESS, siteId).execute
                       (newSession, new Func <string, bool, VistaFileTO>(new ToolsLib(newSession).getFile), new object[] { fileNumber, includeXRefs }));
        }
Exemple #3
0
        public TextArray ddrGetsEntry(string siteId, string file, string iens, string flds, string flags)
        {
            MySession newSession = new MySession();

            return((TextArray)QueryTemplate.getQuery(QueryType.STATELESS, siteId).execute
                       (newSession, new Func <string, string, string, string, TextArray>(new ToolsLib(newSession).ddrGetsEntry), new object[] { file, iens, flds, flags }));
        }
Exemple #4
0
        public TextTO getVariableValue(string siteId, string arg)
        {
            MySession newSession = new MySession();

            return((TextTO)QueryTemplate.getQuery(QueryType.STATELESS, siteId).execute
                       (newSession, new Func <string, TextTO>(new ToolsLib(newSession).getVariableValue), new object[] { arg }));
        }
        public UserTO login(string token, string username, string pwd, string permission)
        {
            MySession session = SessionMgr.getInstance().getSession(token);

            return((UserTO)QueryTemplate.getQuery(QueryType.REST).execute(session, new Func <string, string, string, UserTO>
                                                                              (new rest.AccountLib(session).login), new object[] { username, pwd, permission }));
        }
Exemple #6
0
        public TaggedText siteHasPatch(string siteId, string patchId)
        {
            MySession newSession = new MySession();

            return((TaggedText)QueryTemplate.getQuery(QueryType.STATELESS, siteId).execute
                       (newSession, new Func <string, TaggedText>(new ConnectionLib(newSession).siteHasPatch), new object[] { patchId }));
        }
        public TaggedAppointmentArray getPendingAppointments(string token, string startDate)
        {
            MySession session = SessionMgr.getInstance().getSession(token);

            return((TaggedAppointmentArray)QueryTemplate.getQuery(QueryType.REST).execute(session, new Func <string, TaggedAppointmentArray>
                                                                                              (new SchedulingLib(session).getPendingAppointments), new object[] { startDate }));
        }
        public PatientArray getPatientsByClinic(string token, string clinicId, string startDate, string stopDate)
        {
            MySession session = SessionMgr.getInstance().getSession(token);

            return((PatientArray)QueryTemplate.getQuery(QueryType.REST).execute(session, new Func <string, string, string, PatientArray>
                                                                                    (new SchedulingLib(session).getPatientsByClinic), new object[] { clinicId, startDate, stopDate }));
        }
        public AppointmentTypeArray getAppointmentTypes(string token, string target)
        {
            MySession session = SessionMgr.getInstance().getSession(token);

            return((AppointmentTypeArray)QueryTemplate.getQuery(QueryType.REST).execute(session, new Func <string, AppointmentTypeArray>
                                                                                            (new SchedulingLib(session).getAppointmentTypes), new object[] { target }));
        }
        public HospitalLocationTO getClinicSchedulingDetails(string token, string clinicId)
        {
            MySession session = SessionMgr.getInstance().getSession(token);

            return((HospitalLocationTO)QueryTemplate.getQuery(QueryType.REST).execute(session, new Func <string, HospitalLocationTO>
                                                                                          (new SchedulingLib(session).getClinicSchedulingDetails), new object[] { clinicId }));
        }
        public TaggedHospitalLocationArray getClinics(string token, string target)
        {
            MySession session = SessionMgr.getInstance().getSession(token);

            return((TaggedHospitalLocationArray)QueryTemplate.getQuery(QueryType.REST).execute(session, new Func <string, string, string, TaggedHospitalLocationArray>
                                                                                                   (new EncounterLib(session).getClinics), new object[] { "", target, "" }));
        }
        public PatientTO select(string token, string pid)
        {
            MySession session = SessionMgr.getInstance().getSession(token);

            return((PatientTO)QueryTemplate.getQuery(QueryType.REST).execute(session, new Func <string, PatientTO>
                                                                                 (new PatientLib(session).select), new object[] { pid }));
        }
        public AppointmentTO makeAppointment(string token, string clinicId, string appointmentTimestamp, string purpose,
                                             string purposeSubcategory, string appointmentType, string appointmentLength)
        {
            MySession session = SessionMgr.getInstance().getSession(token);

            return((AppointmentTO)QueryTemplate.getQuery(QueryType.REST).execute(session, new Func <string, string, string, string, string, string, AppointmentTO>
                                                                                     (new SchedulingLib(session).makeAppointment), new object[] { clinicId, appointmentTimestamp, purpose, purposeSubcategory, appointmentLength, appointmentType }));
        }
Exemple #14
0
        public TextTO update(String siteId, String file, String recordId, String jsonDictionaryFieldsAndValues)
        {
            MySession newSession = new MySession();

            return((TextTO)QueryTemplate.getQuery(QueryType.STATELESS, siteId)
                   .execute(newSession, new Func <String, String, String, TextTO>(new ToolsLib(newSession).update),
                            new object[] { jsonDictionaryFieldsAndValues, recordId, file }));
        }
Exemple #15
0
        public TextArray ddrLister(string siteId, string file, string iens, string fields, string flags, string maxrex, string from, string part, string xref, string screen, string identifier)
        {
            MySession newSession = new MySession();

            return((TextArray)QueryTemplate.getQuery(QueryType.STATELESS, siteId).execute
                       (newSession, new Func <string, string, string, string, string, string, string, string, string, string, TextArray>(new ToolsLib(newSession).ddrLister),
                       new object[] { file, iens, fields, flags, maxrex, from, part, xref, screen, identifier }));
        }
Exemple #16
0
        //public TextTO create(String siteId, String file, String parentRecordIdString, String jsonDictionaryFieldsAndValues)
        //{
        //    MySession newSession = new MySession();
        //    return (TextTO)QueryTemplate.getQuery(QueryType.STATELESS, siteId)
        //        .execute(newSession, new Func<String, String, String, TextTO>(new ToolsLib(newSession).create),
        //        new object[] { jsonDictionaryFieldsAndValues, file, parentRecordIdString });
        //}

        public VistaRecordTO read(String siteId, String file, String recordId, String fields)
        {
            MySession newSession = new MySession();

            return((VistaRecordTO)QueryTemplate.getQuery(QueryType.STATELESS, siteId)
                   .execute(newSession, new Func <String, String, String, VistaRecordTO>(new ToolsLib(newSession).read),
                            new object[] { recordId, fields, file }));
        }
Exemple #17
0
        public TextTO delete(String siteId, String file, String recordId)
        {
            MySession newSession = new MySession();

            return((TextTO)QueryTemplate.getQuery(QueryType.STATELESS, siteId)
                   .execute(newSession, new Func <String, String, TextTO>(new ToolsLib(newSession).delete),
                            new object[] { recordId, file }));
        }
Exemple #18
0
        public Stream getVistaFile(String siteId, String fileNumber, String pwd)
        {
            MySession   newSession = new MySession();
            VistaFileTO result     = (VistaFileTO)QueryTemplate.getQuery(QueryType.STATELESS, siteId).execute(newSession,
                                                                                                              new Func <String, bool, VistaFileTO>(new ToolsLib(newSession).getFile),
                                                                                                              new object[] { fileNumber, true });

            return(new MemoryStream(System.Text.Encoding.UTF8.GetBytes(JsonUtils.Serialize <VistaFileTO>(result))));
        }
Exemple #19
0
        public static QueryTemplate getQuery(QueryType type, String sites)
        {
            QueryTemplate qt = getQuery(type);

            qt.QuerySites = new List <String>()
            {
                sites
            };
            return(qt);
        }
Exemple #20
0
        public Stream create(System.IO.Stream postBody, String siteId, String pwd)
        {
            if (!String.Equals(pwd, _mySession.MdwsConfiguration.AllConfigs["CRUD"]["Password"]))
            {
                return(new MemoryStream(System.Text.Encoding.UTF8.GetBytes(JsonUtils.Serialize <TextTO>(new TextTO()
                {
                    fault = new FaultTO("Incorrect password")
                }))));
            }
            if (!String.Equals("true", _mySession.MdwsConfiguration.AllConfigs["CRUD"]["EnableCreate"], StringComparison.CurrentCultureIgnoreCase))
            {
                return(new MemoryStream(System.Text.Encoding.UTF8.GetBytes(JsonUtils.Serialize <TextTO>(new TextTO()
                {
                    fault = new FaultTO("Create not enabled")
                }))));
            }

            MySession     newSession       = new MySession();
            VistaRecordTO deserializedBody = null;

            try
            {
                String body = "";
                using (StreamReader sr = new StreamReader(postBody))
                {
                    body = sr.ReadToEnd();
                }
                deserializedBody = JsonUtils.Deserialize <VistaRecordTO>(body);
            }
            catch (Exception exc)
            {
                TextTO fault = new TextTO()
                {
                    fault = new FaultTO(exc)
                };
                return(new MemoryStream(System.Text.Encoding.UTF8.GetBytes(JsonUtils.Serialize <TextTO>(fault))));
            }

            TextTO result = (TextTO)QueryTemplate.getQuery(QueryType.STATELESS, siteId)
                            .execute(newSession, new Func <VistaRecordTO, TextTO>(new ToolsLib(newSession).create),
                                     new object[] { deserializedBody });

            return(new MemoryStream(System.Text.Encoding.UTF8.GetBytes(JsonUtils.Serialize <TextTO>(result))));
        }
Exemple #21
0
        public Stream delete(String siteId, String file, String recordId, String pwd)
        {
            if (!String.Equals(pwd, _mySession.MdwsConfiguration.AllConfigs["CRUD"]["Password"]))
            {
                return(new MemoryStream(System.Text.Encoding.UTF8.GetBytes(JsonUtils.Serialize <TextTO>(new TextTO()
                {
                    fault = new FaultTO("Incorrect password")
                }))));
            }
            if (!String.Equals("true", _mySession.MdwsConfiguration.AllConfigs["CRUD"]["EnableDelete"], StringComparison.CurrentCultureIgnoreCase))
            {
                return(new MemoryStream(System.Text.Encoding.UTF8.GetBytes(JsonUtils.Serialize <TextTO>(new TextTO()
                {
                    fault = new FaultTO("Delete not enabled")
                }))));
            }

            MySession newSession = new MySession();
            TextTO    result     = (TextTO)QueryTemplate.getQuery(QueryType.STATELESS, siteId)
                                   .execute(newSession, new Func <String, String, TextTO>(new ToolsLib(newSession).delete),
                                            new object[] { recordId, file });

            return(new MemoryStream(System.Text.Encoding.UTF8.GetBytes(JsonUtils.Serialize <TextTO>(result))));
        }
Exemple #22
0
        public Stream readRange(string siteId, string file, string fields, string iens, string flags, string from, string xref, string maxRex, string part, string screen, string identifier, String pwd)
        {
            if (!String.Equals(pwd, _mySession.MdwsConfiguration.AllConfigs["CRUD"]["Password"]))
            {
                return(new MemoryStream(System.Text.Encoding.UTF8.GetBytes(JsonUtils.Serialize <TextArray>(new TextArray()
                {
                    fault = new FaultTO("Incorrect password")
                }))));
            }
            if (!String.Equals("true", _mySession.MdwsConfiguration.AllConfigs["CRUD"]["EnableReadRange"], StringComparison.CurrentCultureIgnoreCase))
            {
                return(new MemoryStream(System.Text.Encoding.UTF8.GetBytes(JsonUtils.Serialize <TextArray>(new TextArray()
                {
                    fault = new FaultTO("Read range not enabled")
                }))));
            }

            MySession newSession = new MySession();
            TextArray result     = (TextArray)QueryTemplate.getQuery(QueryType.STATELESS, siteId)
                                   .execute(newSession, new Func <String, String, String, String, String, String, String, String, String, String, TextArray>(new ToolsLib(newSession).readRange),
                                            new object[] { file, fields, iens, flags, xref, maxRex, from, part, screen, identifier });

            return(new MemoryStream(System.Text.Encoding.UTF8.GetBytes(JsonUtils.Serialize <TextArray>(result))));
        }
Exemple #23
0
 public PatientArray getPatientsByClinic(string clinicId, string startDate, string stopDate)
 {
     return((PatientArray)QueryTemplate.getQuery(QueryType.SOAP).execute(this.MySession, new Func <string, string, string, PatientArray>
                                                                             (new SchedulingLib(this.MySession).getPatientsByClinic), new object[] { clinicId, startDate, stopDate }));
 }
Exemple #24
0
 public BoolTO isValidStopCode(string stopCodeId)
 {
     return((BoolTO)QueryTemplate.getQuery(QueryType.SOAP).execute(this.MySession, new Func <string, BoolTO>
                                                                       (new SchedulingLib(this.MySession).isValidStopCode), new object[] { stopCodeId }));
 }
Exemple #25
0
 public TaggedHospitalLocationArray getClinics(string target)
 {
     return((TaggedHospitalLocationArray)QueryTemplate.getQuery(QueryType.SOAP).execute(this.MySession, new Func <string, string, string, TaggedHospitalLocationArray>
                                                                                            (new EncounterLib(this.MySession).getClinics), new object[] { "", target, "" }));
 }
Exemple #26
0
 public HospitalLocationTO getClinicSchedulingDetails(string clinicId)
 {
     return((HospitalLocationTO)QueryTemplate.getQuery(QueryType.SOAP).execute(this.MySession, new Func <string, HospitalLocationTO>
                                                                                   (new SchedulingLib(this.MySession).getClinicSchedulingDetails), new object[] { clinicId }));
 }
Exemple #27
0
 public AppointmentTypeArray getAppointmentTypes(string target)
 {
     return((AppointmentTypeArray)QueryTemplate.getQuery(QueryType.SOAP).execute(this.MySession, new Func <string, AppointmentTypeArray>
                                                                                     (new SchedulingLib(this.MySession).getAppointmentTypes), new object[] { target }));
 }
Exemple #28
0
 public PatientTO select(string pid)
 {
     return((PatientTO)QueryTemplate.getQuery(QueryType.SOAP).execute(this.MySession, new Func <string, PatientTO>
                                                                          (new PatientLib(this.MySession).select), new object[] { pid }));
 }
Exemple #29
0
 public AppointmentTO makeAppointment(string clinicId, string appointmentTimestamp, string purpose, string purposeSubcategory, string appointmentLength, string appointmentType)
 {
     return((AppointmentTO)QueryTemplate.getQuery(QueryType.SOAP).execute(this.MySession, new Func <string, string, string, string, string, string, AppointmentTO>
                                                                              (new SchedulingLib(this.MySession).makeAppointment), new object[] { clinicId, appointmentTimestamp, purpose, purposeSubcategory, appointmentLength, appointmentType }));
 }
Exemple #30
0
 public TaggedAppointmentArray getPendingAppointments(string startDate)
 {
     return((TaggedAppointmentArray)QueryTemplate.getQuery(QueryType.SOAP).execute(this.MySession, new Func <string, TaggedAppointmentArray>
                                                                                       (new SchedulingLib(this.MySession).getPendingAppointments), new object[] { startDate }));
 }