public bool UpdateDemographics(ClientDemographicsWebSvc.ClientDemographicsObject ClientDemo)
 {
     var clientRepo = new ClientRepository();
     PopulateReturnOptionObject();
     var client = clientRepo.GetClientById(optionObject.EntityID);
     if (!String.IsNullOrEmpty(client.City))
         ClientDemo.ClientAddressCity = client.City;
     return clientRepo.UpdateClientDemographics(ClientDemo, optionObject.EntityID);
 }
Ejemplo n.º 2
0
 public void DefaultCurrentProgram()
 {
     var currentProgramValue = this.OriginalOptionObject.Forms.First().CurrentRow.Fields.FirstOrDefault(f => f.FieldNumber.Equals(this.ProgramFieldNumber));
     if (currentProgramValue != null && String.IsNullOrEmpty(currentProgramValue.FieldValue))
     {
         var client = new ClientRepository().GetClientByIdWithEpisode(
             this.OriginalOptionObject.EntityID,
             this.OriginalOptionObject.EpisodeNumber);
         var tempFieldObject = new FieldObject
         {
             FieldNumber = this.ProgramFieldNumber,
             FieldValue = client.EpisodeInformation.ProgramCode
         };
         UpdateReturnOptionObject(tempFieldObject);
     }
 }
Ejemplo n.º 3
0
 public void CreateChiefComplaint()
 {
     var currentChiefComplaintValue = this.OriginalOptionObject.Forms.First().CurrentRow.Fields.FirstOrDefault(f => f.FieldNumber.Equals(this.ChiefComplaintFieldNumber));
     if (currentChiefComplaintValue != null && String.IsNullOrEmpty(currentChiefComplaintValue.FieldValue))
     {
         var Client = new ClientRepository().GetClientById(this.OriginalOptionObject.EntityID);
         var DefaultText = String.Format("Patient, {0}, a {1} year old {2} {3} came in for follow-up on {4}.",
             Client.Name,
             Client.Age,
             Client.GenderValue,
             Client.RaceValue,
             DateTime.Now.ToShortDateString());
         var tempFieldObject = new FieldObject
         {
             FieldNumber = this.ChiefComplaintFieldNumber,
             FieldValue = DefaultText
         };
         UpdateReturnOptionObject(tempFieldObject);
     }
 }