Inheritance: AbstractArrayTO
 private void initCollections()
 {
     ContinuityOfCareDocuments = new TaggedTextArray();
     Patient          = new PatientTO();
     Meds             = new TaggedMedicationArrays();
     Allergies        = new TaggedAllergyArrays();
     Appointments     = new TaggedAppointmentArrays();
     Notes            = new TaggedNoteArrays();
     ChemHemReports   = new TaggedChemHemRptArrays();
     MicroReports     = new TaggedMicrobiologyRptArrays();
     Problems         = new TaggedProblemArrays();
     RadiologyReports = new TaggedRadiologyReportArrays();
     SurgeryReports   = new TaggedSurgeryReportArrays();
     Vitals           = new TaggedVitalSignArrays();
 }
Esempio n. 2
0
 private void initCollections()
 {
     //CCR = new ContinuityOfCareRecord() { Body = new ContinuityOfCareRecordBody() };
     //CCR.Body.Immunizations = new List<StructuredProductType>();
     FaultArray   = new TaggedFaultArray();
     Patient      = new TaggedPatientArrays();
     Meds         = new TaggedMedicationArrays();
     Allergies    = new TaggedAllergyArrays();
     Appointments = new TaggedAppointmentArrays();
     Notes        = new TaggedNoteArrays();
     //ChemHemReports = new TaggedChemHemRptArrays();
     //MicroReports = new TaggedMicrobiologyRptArrays();
     Problems = new TaggedProblemArrays();
     //RadiologyReports = new TaggedRadiologyReportArrays();
     SurgeryReports = new TaggedSurgeryReportArrays();
     Vitals         = new TaggedVitalSignArrays();
     Immunizations  = new TaggedImmunizationArrays();
     ImagingExams   = new TaggedImagingExamArrays();
     EKGs           = new TaggedClinicalProcedureArrays();
 }
Esempio n. 3
0
        public PatientMedicalRecordTO(IndexedHashtable ihs)
        {
            //initCollections();

            if (ihs == null || ihs.Count == 0)
            {
                return;
            }

            FaultArray = new TaggedFaultArray(ihs); // we need a way to report faults at the top level - this should provide that

            Patient            = new TaggedPatientArrays(ihs);
            Immunizations      = new TaggedImmunizationArrays(ihs);
            Vitals             = new TaggedVitalSignArrays(ihs);
            ImagingExams       = new TaggedImagingExamArrays(ihs);
            Problems           = new TaggedProblemArrays(ihs);
            DischargeSummaries = new TaggedNoteArrays(ihs, "dischargeSummaries");
            Notes     = new TaggedNoteArrays(ihs);
            Labs      = new TaggedLabReportArrays(ihs);
            Allergies = new TaggedAllergyArrays(ihs);
            EKGs      = new TaggedClinicalProcedureArrays(ihs);
        }
Esempio n. 4
0
 private void initCollections()
 {
     ContinuityOfCareDocuments = new TaggedTextArray();
     Patient = new PatientTO();
     Meds = new TaggedMedicationArrays();
     Allergies = new TaggedAllergyArrays();
     Appointments = new TaggedAppointmentArrays();
     Notes = new TaggedNoteArrays();
     ChemHemReports = new TaggedChemHemRptArrays();
     MicroReports = new TaggedMicrobiologyRptArrays();
     Problems = new TaggedProblemArrays();
     RadiologyReports = new TaggedRadiologyReportArrays();
     SurgeryReports = new TaggedSurgeryReportArrays();
     Vitals = new TaggedVitalSignArrays();
 }
Esempio n. 5
0
        public TaggedNoteArrays getUnsignedNotes(string fromDate, string toDate, int nNotes)
        {
            TaggedNoteArrays result = new TaggedNoteArrays();

            string msg = MdwsUtils.isAuthorizedConnection(_mySession);
            if (msg != "OK")
            {
                result.fault = new FaultTO(msg);
            }
            else if (fromDate == "")
            {
                result.fault = new FaultTO("Missing fromDate");
            }
            else if (toDate == "")
            {
                result.fault = new FaultTO("Missing toDate");
            }
            if (result.fault != null)
            {
                return result;
            }

            try
            {
                NoteApi api = new NoteApi();
                IndexedHashtable t = api.getUnsignedNotes(_mySession.ConnectionSet, fromDate, toDate, nNotes);
                result = new TaggedNoteArrays(t);
            }
            catch (Exception e)
            {
                result.fault = new FaultTO(e);
            }
            return result;
        }
Esempio n. 6
0
        public TaggedNoteArrays getNotesWithText(string fromDate, string toDate, int nNotes)
        {
            TaggedNoteArrays result = new TaggedNoteArrays();

            if (!_mySession.ConnectionSet.IsAuthorized)
            {
                result.fault = new FaultTO("Connections not ready for operation", "Need to login?");
            }
            else if (fromDate == "")
            {
                result.fault = new FaultTO("Missing fromDate");
            }
            else if (toDate == "")
            {
                result.fault = new FaultTO("Missing toDate");
            }
            if (result.fault != null)
            {
                return result;
            }

            try
            {
                NoteApi api = new NoteApi();
                IndexedHashtable t = api.getNotes(_mySession.ConnectionSet, fromDate, toDate, nNotes);
                result = new TaggedNoteArrays(t);
            }
            catch (Exception e)
            {
                result.fault = new FaultTO(e);
            }
            return result;
        }
Esempio n. 7
0
        public TaggedNoteArrays getNotesForBhie(string pwd, string mpiPid, string fromDate, string toDate, string nNotes)
        {
            TaggedNoteArrays result = new TaggedNoteArrays();
            if (String.Equals(pwd, _mySession.MdwsConfiguration.AllConfigs[ConfigFileConstants.PRIMARY_CONFIG_SECTION][MdwsConfigConstants.BHIE_PASSWORD]))
            {
                result.fault = new FaultTO("Invalid application password");
            }
            else if (String.IsNullOrEmpty(mpiPid))
            {
                result.fault = new FaultTO("Missing mpiPid");
            }
            else if (String.IsNullOrEmpty(fromDate))
            {
                result.fault = new FaultTO("Missing fromDate");
            }
            else if (String.IsNullOrEmpty(toDate))
            {
                result.fault = new FaultTO("Missing toDate");
            }
            if (result.fault != null)
            {
                return result;
            }

            if (nNotes == "")
            {
                nNotes = "50";
            }

            try
            {
                int maxNotes = Convert.ToInt16(nNotes);
                PatientLib patLib = new PatientLib(_mySession);
                TaggedTextArray sites = patLib.getPatientSitesByMpiPid(mpiPid);
                if (sites == null)
                {
                    return null;
                }
                if (sites.fault != null)
                {
                    result.fault = sites.fault;
                    return result;
                }

                string sitelist = "";
                for (int i = 0; i < sites.count; i++)
                {
                    if ((string)sites.results[i].tag == "200")
                    {
                        continue;
                    }
                    if (sites.results[i].fault != null)
                    {
                    }
                    else
                    {
                        sitelist += (string)sites.results[i].tag + ',';
                    }
                }
                sitelist = sitelist.Substring(0, sitelist.Length - 1);

                AccountLib acctLib = new AccountLib(_mySession);
                sites = acctLib.visitSites("BHIE", sitelist, MdwsConstants.CPRS_CONTEXT);
                if (sites.fault != null)
                {
                    result.fault = sites.fault;
                    return result;
                }

                PatientApi patApi = new PatientApi();
                IndexedHashtable t = patApi.setLocalPids(_mySession.ConnectionSet, mpiPid);
                NoteApi api = new NoteApi();
                IndexedHashtable tNotes = api.getNotes(_mySession.ConnectionSet, fromDate, toDate, maxNotes);
                IndexedHashtable tSumms = api.getDischargeSummaries(_mySession.ConnectionSet, fromDate, toDate, 50);
                result = new TaggedNoteArrays(mergeNotesAndDischargeSummaries(tNotes, tSumms));
            }
            catch (Exception ex)
            {
                result.fault = new FaultTO(ex);
            }
            finally
            {
                if (_mySession.ConnectionSet != null)
                {
                    _mySession.ConnectionSet.disconnectAll();
                }
            }
            return result;
        }