示例#1
0
        /// <summary>
        /// Processes the single aggregate.
        /// </summary>
        /// <param name="patientDemographicDetailsDto">The patient demographic details dto.</param>
        /// <param name="patient">The patient.</param>
        /// <returns>A <see cref="System.Boolean"/></returns>
        protected override bool ProcessSingleAggregate(PatientDemographicDetailsDto patientDemographicDetailsDto, Patient patient)
        {
            var stateProvince      = _mappingHelper.MapLookupField <StateProvince> (patientDemographicDetailsDto.BirthStateProvince);
            var birthCountyArea    = _mappingHelper.MapLookupField <CountyArea> (patientDemographicDetailsDto.BirthCountyArea);
            var countyArea         = _mappingHelper.MapLookupField <CountyArea> (patientDemographicDetailsDto.CountyArea);
            var geographicalRegion = _mappingHelper.MapLookupField <GeographicalRegion> (patientDemographicDetailsDto.GeographicalRegion);

            PatientBirthInfo patientBirthInfo = new PatientBirthInfoBuilder()
                                                .WithBirthCityName(patientDemographicDetailsDto.BirthCityName)
                                                .WithBirthCountyArea(birthCountyArea)
                                                .WithBirthFirstName(patientDemographicDetailsDto.BirthFirstName)
                                                .WithBirthLastName(patientDemographicDetailsDto.BirthLastName)
                                                .WithBirthStateProvince(stateProvince);

            patient.ReviseBirthInfo(patientBirthInfo);

            var motherName = new MotherName(patientDemographicDetailsDto.MotherFirstName, patientDemographicDetailsDto.MotherMaidenName);

            patient.ReviseMotherName(motherName);

            var assignedPostalCode = string.IsNullOrWhiteSpace(patientDemographicDetailsDto.ZipCode)
                                                ? null
                                                : new PostalCode(patientDemographicDetailsDto.ZipCode);

            var patientAssignedArea = new PatientAssignedArea(countyArea, geographicalRegion, assignedPostalCode);

            patient.ReviseAssignedArea(patientAssignedArea);

            return(true);
        }
示例#2
0
 /// <summary>
 /// Revises the assigned area.
 /// </summary>
 /// <param name="patientAssignedArea">The patient assigned area.</param>
 public virtual void ReviseAssignedArea(PatientAssignedArea patientAssignedArea)
 {
     _assignedArea = patientAssignedArea;
 }