public TaggedPatientAssociateArray(string tag, PatientAssociate mdo)
 {
     this.tag = tag;
     if (mdo == null)
     {
         this.count = 0;
         return;
     }
     this.pas    = new PatientAssociateTO[1];
     this.pas[0] = new PatientAssociateTO(mdo);
     this.count  = 1;
 }
 public PatientAssociateTO(PatientAssociate mdo)
 {
     this.name = mdo.Name.getLastNameFirst();
     if (mdo.HomeAddress != null)
     {
         this.homeAddress = new AddressTO(mdo.HomeAddress);
     }
     if (mdo.HomePhone != null)
     {
         this.homePhone = new PhoneNumTO(mdo.HomePhone);
     }
     if (mdo.CellPhone != null)
     {
         this.cellPhone = new PhoneNumTO(mdo.CellPhone);
     }
     this.association           = mdo.Association;
     this.relationshipToPatient = mdo.RelationshipToPatient;
     this.facilityName          = mdo.FacilityName;
 }
Example #3
0
 internal PatientAssociate parseGuardianRecord(string record)
 {
     if (record == "" || record == "^^^^^^^^^^^0")
     {
         return null;
     }
     string[] flds = StringUtils.split(record, StringUtils.CARET);
     PatientAssociate result = new PatientAssociate();
     result.Name = new PersonName(flds[3]);
     result.RelationshipToPatient = flds[4];
     result.HomeAddress = new Address();
     result.HomeAddress.Street1 = flds[5];
     result.HomeAddress.Street2 = flds[6];
     result.HomeAddress.City = flds[7];
     result.HomeAddress.State = getStateName(flds[8]);
     result.HomeAddress.Zipcode = flds[9];
     if (flds.Length > 7 && flds[10] != "")
     {
         result.HomePhone = new PhoneNum(flds[10]);
     }
     return result;
 }