patientVisit() public méthode

patientVisit This method is used by MHV and will probably be used by other PHR apps.
public patientVisit ( string pwd, string homeSitecode, string mpiPid, bool multiSite ) : SiteArray
pwd string Client app's BSE security phrase
homeSitecode string Station number
mpiPid string ICN
multiSite bool Set to false for now
Résultat gov.va.medora.mdws.dto.SiteArray
Exemple #1
0
        public TaggedChemHemRptArray getChemHemReportsByReportDateFromSite(
            string pwd, string sitecode, string mpiPid, string fromDate, string toDate)
        {
            TaggedChemHemRptArray result = new TaggedChemHemRptArray();

            if (String.IsNullOrEmpty(sitecode))
            {
                result.fault = new FaultTO("Missing sitecode");
            }
            else if (mpiPid == "")
            {
                result.fault = new FaultTO("Missing mpiPid");
            }
            else if (fromDate == "")
            {
                result.fault = new FaultTO("Missing fromDate");
            }
            if (result.fault != null)
            {
                return(result);
            }

            if (toDate == "")
            {
                toDate = DateTime.Now.ToString("yyyyMMdd");
            }

            AccountLib acctLib = new AccountLib(mySession);

            try
            {
                // Visit as DoD user...
                SiteArray sites = acctLib.patientVisit(pwd, sitecode, mpiPid, false);
                if (sites.fault != null)
                {
                    result.fault = sites.fault;
                    return(result);
                }

                // Get the labs...
                ChemHemReport[] rpts = ChemHemReport.getChemHemReports(mySession.ConnectionSet.getConnection(sitecode), fromDate, toDate);
                result = new TaggedChemHemRptArray(sitecode, rpts);
            }
            catch (Exception e)
            {
                result.fault = new FaultTO(e.Message);
            }
            finally
            {
                mySession.close();
            }
            return(result);
        }
Exemple #2
0
        public TaggedAppointmentArray getAppointmentsFromSite(
            string pwd, string sitecode, string mpiPid)
        {
            TaggedAppointmentArray result = new TaggedAppointmentArray();

            if (String.IsNullOrEmpty(sitecode))
            {
                result.fault = new FaultTO("Missing sitecode");
            }
            else if (String.IsNullOrEmpty(mpiPid))
            {
                result.fault = new FaultTO("Missing mpiPid");
            }
            if (result.fault != null)
            {
                return(result);
            }

            AccountLib acctLib = new AccountLib(mySession);

            try
            {
                // Visit as DoD user...
                SiteArray sites = acctLib.patientVisit(pwd, sitecode, mpiPid, false);
                if (sites.fault != null)
                {
                    result.fault = sites.fault;
                    return(result);
                }

                // Get the labs...
                EncounterApi  api   = new EncounterApi();
                Appointment[] appts = api.getAppointments(mySession.ConnectionSet.getConnection(sitecode));
                for (int i = 0; i < appts.Length; i++)
                {
                    appts[i].Status = undecodeApptStatus(appts[i].Status);
                }
                result = new TaggedAppointmentArray(sitecode, appts);
            }
            catch (Exception e)
            {
                result.fault = new FaultTO(e.Message);
            }
            finally
            {
                mySession.close();
            }
            return(result);
        }
Exemple #3
0
        public TextTO getHealthSummary(string pwd, string sitecode, string mpiPid, string displayName)
        {
            TextTO result = new TextTO();

            if (String.IsNullOrEmpty(sitecode))
            {
                result.fault = new FaultTO("Missing sitecode");
            }
            else if (mpiPid == "")
            {
                result.fault = new FaultTO("Missing mpiPid");
            }
            else if (displayName == "")
            {
                result.fault = new FaultTO("Missing displayName");
            }
            if (result.fault != null)
            {
                return(result);
            }

            AccountLib acctLib = new AccountLib(mySession);

            try
            {
                // Visit as DoD user...
                SiteArray sites = acctLib.patientVisit(pwd, sitecode, mpiPid, false);
                if (sites.fault != null)
                {
                    result.fault = sites.fault;
                    return(result);
                }

                // Get the labs...
                ClinicalLib clinicalLib = new ClinicalLib(mySession);
                result = clinicalLib.getAdHocHealthSummaryByDisplayName(sitecode, displayName);
            }
            catch (Exception e)
            {
                result.fault = new FaultTO(e.Message);
            }
            finally
            {
                mySession.close();
            }
            return(result);
        }
Exemple #4
0
        public TaggedAppointmentArray getAppointmentsFromSite(
            string pwd, string sitecode, string mpiPid)
        {
            TaggedAppointmentArray result = new TaggedAppointmentArray();

            if (String.IsNullOrEmpty(sitecode))
            {
                result.fault = new FaultTO("Missing sitecode");
            }
            else if (String.IsNullOrEmpty(mpiPid))
            {
                result.fault = new FaultTO("Missing mpiPid");
            }
            if (result.fault != null)
            {
                return result;
            }

            AccountLib acctLib = new AccountLib(mySession);
            try
            {
                SiteArray sites = acctLib.patientVisit(pwd, sitecode, mpiPid, false);
                if (sites.fault != null)
                {
                    result.fault = sites.fault;
                    return result;
                }

                // Get the labs...
                EncounterApi api = new EncounterApi();
                Appointment[] appts = api.getAppointments(mySession.ConnectionSet.getConnection(sitecode));
                for (int i = 0; i < appts.Length; i++)
                {
                    appts[i].Status = undecodeApptStatus(appts[i].Status);
                }
                result = new TaggedAppointmentArray(sitecode, appts);
            }
            catch (Exception e)
            {
                result.fault = new FaultTO(e.Message);
            }
            finally
            {
                mySession.close();
            }
            return result;
        }
Exemple #5
0
        public TextTO getHealthSummary(string pwd, string sitecode, string mpiPid, string displayName)
        {
            TextTO result = new TextTO();

            if (String.IsNullOrEmpty(sitecode))
            {
                result.fault = new FaultTO("Missing sitecode");
            }
            else if (mpiPid == "")
            {
                result.fault = new FaultTO("Missing mpiPid");
            }
            else if (displayName == "")
            {
                result.fault = new FaultTO("Missing displayName");
            }
            if (result.fault != null)
            {
                return result;
            }

            AccountLib acctLib = new AccountLib(mySession);
            try
            {
                SiteArray sites = acctLib.patientVisit(pwd, sitecode, mpiPid, false);
                if (sites.fault != null)
                {
                    result.fault = sites.fault;
                    return result;
                }

                // Get the labs...
                ClinicalLib clinicalLib = new ClinicalLib(mySession);
                result = clinicalLib.getAdHocHealthSummaryByDisplayName(sitecode, displayName);
            }
            catch (Exception e)
            {
                result.fault = new FaultTO(e.Message);
            }
            finally
            {
                mySession.close();
            }
            return result;
        }
Exemple #6
0
        public TaggedChemHemRptArray getChemHemReportsByReportDateFromSite(
            string pwd, string sitecode, string mpiPid, string fromDate, string toDate)
        {
            TaggedChemHemRptArray result = new TaggedChemHemRptArray();

            if (String.IsNullOrEmpty(sitecode))
            {
                result.fault = new FaultTO("Missing sitecode");
            }
            else if (mpiPid == "")
            {
                result.fault = new FaultTO("Missing mpiPid");
            }
            else if (fromDate == "")
            {
                result.fault = new FaultTO("Missing fromDate");
            }
            if (result.fault != null)
            {
                return result;
            }

            if (toDate == "")
            {
                toDate = DateTime.Now.ToString("yyyyMMdd");
            }

            AccountLib acctLib = new AccountLib(mySession);
            try
            {
                SiteArray sites = acctLib.patientVisit(pwd, sitecode, mpiPid, false);
                if (sites.fault != null)
                {
                    result.fault = sites.fault;
                    return result;
                }

                // Get the labs...
                ChemHemReport[] rpts = ChemHemReport.getChemHemReports(mySession.ConnectionSet.getConnection(sitecode), fromDate, toDate);
                result = new TaggedChemHemRptArray(sitecode, rpts);
            }
            catch (Exception e)
            {
                result.fault = new FaultTO(e.Message);
            }
            finally
            {
                mySession.close();
            }
            return result;
        }