Beispiel #1
0
 public AddressTO(Address mdo)
 {
     this.streetAddress1 = mdo.Street1;
     this.streetAddress2 = mdo.Street2;
     this.streetAddress3 = mdo.Street3;
     this.city = mdo.City;
     this.county = mdo.County;
     this.state = mdo.State;
     this.zipcode = mdo.Zipcode;
 }
Beispiel #2
0
 public AddressTO(Address mdo)
 {
     this.validFrom = mdo.ValidFrom;
     this.validTo = mdo.ValidTo;
     this.country = mdo.Country;
     this.streetAddress1 = mdo.Street1;
     this.streetAddress2 = mdo.Street2;
     this.streetAddress3 = mdo.Street3;
     this.city = mdo.City;
     this.county = mdo.County;
     this.state = mdo.State;
     this.zipcode = mdo.Zipcode;
     this.description = mdo.Description;
 }
Beispiel #3
0
        public TaggedDemographicsRecordArrays getClaimants(
            string lastName, string firstName, string middleName, string dob,
            string zipcode, string state, string city, int maxrex)
        {
            TaggedDemographicsRecordArrays result = new TaggedDemographicsRecordArrays();

            try
            {
                buildConnectionSetForGetClaimants();
                Address addr = new Address();
                if (!String.IsNullOrEmpty(zipcode))
                {
                    addr.Zipcode = zipcode;
                }
                if (!String.IsNullOrEmpty(state))
                {
                    addr.State = state;
                }
                if (!String.IsNullOrEmpty(city))
                {
                    addr.City = city;
                }
                IndexedHashtable t = Claim.getClaimants(mySession.ConnectionSet, lastName, firstName, middleName, dob, addr, maxrex);
                t = removeDups(t);
                result = new TaggedDemographicsRecordArrays(t);
            }
            catch (Exception ex)
            {
                result.fault = new FaultTO(ex.Message);
            }
            finally
            {
                mySession.ConnectionSet.disconnectAll();
            }
            return result;
        }
Beispiel #4
0
        Patient getNextPatient(SqlDataReader reader)
        {
            Patient p = new Patient();
            p.LocalSiteId = (reader.GetInt16(reader.GetOrdinal("sitecode"))).ToString();

            Decimal d = Convert.ToDecimal(reader.GetDecimal(reader.GetOrdinal("localPid")));
            if ((d - Math.Floor(d)) > 0)
            {
                p.LocalPid = (d).ToString();
            }
            else
            {
                p.LocalPid = (Convert.ToInt64(d)).ToString();
            }
            p.Name = new PersonName(reader.GetString(reader.GetOrdinal("name")));
            p.SSN = new SocSecNum(reader.GetString(reader.GetOrdinal("ssn")));

            if (!reader.IsDBNull(reader.GetOrdinal("gender")))
            {
                p.Gender = reader.GetBoolean(reader.GetOrdinal("gender")) ? "M" : "F"; // 1 or true == male, 0 or false == female
            }
            else
            {
                p.Gender = "";
            }
            if (!reader.IsDBNull(reader.GetOrdinal("vistaDOB")))
            {
                p.DOB = reader.GetString(reader.GetOrdinal("vistaDOB"));
            }
            p.MpiPid = (reader.GetInt32(reader.GetOrdinal("icn"))).ToString();
            p.MpiChecksum = (reader.GetInt32(reader.GetOrdinal("icnx"))).ToString();

            p.Demographics = new Dictionary<string, DemographicSet>();
            DemographicSet demogs = new DemographicSet();
            demogs.PhoneNumbers = new List<PhoneNum>();
            demogs.EmailAddresses = new List<EmailAddress>();
            demogs.StreetAddresses = new List<Address>();

            if (!reader.IsDBNull(reader.GetOrdinal("homePhone")))
            {
                demogs.PhoneNumbers.Add(new PhoneNum(reader.GetString(reader.GetOrdinal("homePhone"))));
            }
            if (!reader.IsDBNull(reader.GetOrdinal("workPhone")))
            {
                demogs.PhoneNumbers.Add(new PhoneNum(reader.GetString(reader.GetOrdinal("workPhone"))));
            }
            if (!reader.IsDBNull(reader.GetOrdinal("cellPhone")))
            {
                demogs.PhoneNumbers.Add(new PhoneNum(reader.GetString(reader.GetOrdinal("cellPhone"))));
            }

            if (!reader.IsDBNull(reader.GetOrdinal("emailAddress")))
            {
                demogs.EmailAddresses.Add(new EmailAddress(reader.GetString(reader.GetOrdinal("emailAddress"))));
            }

            Address address = new Address();
            if (!reader.IsDBNull(reader.GetOrdinal("addressLine1")))
            {
                address.Street1 = reader.GetString(reader.GetOrdinal("addressLine1"));
            }
            if (!reader.IsDBNull(reader.GetOrdinal("addressLine2")))
            {
                address.Street2 = reader.GetString(reader.GetOrdinal("addressLine2"));
            }
            if (!reader.IsDBNull(reader.GetOrdinal("addressLine3")))
            {
                address.Street3 = reader.GetString(reader.GetOrdinal("addressLine3"));
            }
            if (!reader.IsDBNull(reader.GetOrdinal("city")))
            {
                address.City = reader.GetString(reader.GetOrdinal("city"));
            }
            if (!reader.IsDBNull(reader.GetOrdinal("county")))
            {
                address.County = reader.GetString(reader.GetOrdinal("county"));
            }
            if (!reader.IsDBNull(reader.GetOrdinal("state")))
            {
                address.State = reader.GetString(reader.GetOrdinal("state"));
            }
            if (!reader.IsDBNull(reader.GetOrdinal("zipcode")))
            {
                address.Zipcode = reader.GetString(reader.GetOrdinal("zipcode"));
            }
            demogs.StreetAddresses.Add(address);

            p.Demographics.Add(p.LocalSiteId, demogs);

            return p;
        }
Beispiel #5
0
 public static IndexedHashtable getClaimants(
     ConnectionSet cxns, 
     string lastName,
     string firstName,
     string middleName,
     string dob,
     Address addr,
     int maxrex)
 {
     return cxns.query(DAO_NAME, "getClaimants", new object[]
         { lastName,
           firstName,
           middleName,
           dob,
           addr,
           maxrex
         });
 }