match() public méthode

public match ( ConnectionSet cxns, string target ) : IndexedHashtable
cxns ConnectionSet
target string
Résultat IndexedHashtable
Exemple #1
0
        internal TaggedPatientArray match(AbstractConnection cxn, string target)
        {
            TaggedPatientArray result = new TaggedPatientArray();
            if (!cxn.IsConnected)
            {
                result = new TaggedPatientArray("Connection not open");
            }
            else if (cxn.DataSource.Uid == "")
            {
                result = new TaggedPatientArray("No user authorized for lookup");
            }
            else if (target == "")
            {
                result.fault = new FaultTO("Missing target");
            }
            if (result.fault != null)
            {
                return result;
            }

            try
            {
                PatientApi patientApi = new PatientApi();
                Patient[] matches = patientApi.match(cxn, target);
                result = new TaggedPatientArray(cxn.DataSource.SiteId.Id, matches);
            }
            catch (Exception e)
            {
                result.fault = new FaultTO(e.Message);
            }
            return result;
        }
Exemple #2
0
        public TaggedPatientArrays match(string target)
        {
            TaggedPatientArrays result = new TaggedPatientArrays();
            if (!mySession.ConnectionSet.IsAuthorized)
            {
                result.fault = new FaultTO("Connections not ready for operation", "Need to login?");
            }
            else if (String.IsNullOrEmpty(target))
            {
                result.fault = new FaultTO("Missing target");
            }
            if (result.fault != null)
            {
                return result;
            }

            try
            {
                PatientApi api = new PatientApi();
                IndexedHashtable t = api.match(mySession.ConnectionSet, target);
                return new TaggedPatientArrays(t);
            }
            catch (Exception e)
            {
                result.fault = new FaultTO(e.Message);
            }
            return result;
        }
Exemple #3
0
        public RadiologyReportTO getImagingReport(string ssn, string accessionNumber)
        {
            RadiologyReportTO result = new RadiologyReportTO();

            if (!mySession.ConnectionSet.IsAuthorized)
            {
                result.fault = new FaultTO("Connections not ready for operation", "Need to login?");
            }
            else if (String.IsNullOrEmpty(ssn))
            {
                result.fault = new FaultTO("Missing SSN");
            }
            else if (String.IsNullOrEmpty(accessionNumber))
            {
                result.fault = new FaultTO("Missing Accession Number");
            }
            if (result.fault != null)
            {
                return result;
            }

            try
            {
                PatientApi patientApi = new PatientApi();
                Patient[] matches = patientApi.match(mySession.ConnectionSet.BaseConnection, ssn);

                if (matches == null || matches.Length != 1)
                {
                    result.fault = new FaultTO("More than one patient has that SSN in this site (" +
                        mySession.ConnectionSet.BaseConnection.DataSource.SiteId.Id + ")");
                    return result;
                }
                RadiologyReport report = ImagingExam.getReportText(mySession.ConnectionSet.BaseConnection, matches[0].LocalPid, accessionNumber);

                result = new RadiologyReportTO(report);
            }
            catch (Exception e)
            {
                result.fault = new FaultTO(e);
            }

            return result;
        }