Пример #1
0
 private static Patient ToPatient(CreatePharmaceuticalPrescription command)
 {
     return(new Patient
            (
                command.PatientIdentifier,
                new FullName(command.PatientLastName, command.PatientFirstName),
                Enumeration.ParseValue <BelgianSex>((int)command.PatientSex),
                BelgianSocialSecurityNumber.CreateIfNotEmpty(command.PatientSocialSecurityNumber),
                null,
                command.PatientBirthdate
            ));
 }
Пример #2
0
 private static Physician ToPhysician(CreatePharmaceuticalPrescription command)
 {
     return(new Physician
            (
                command.PrescriberIdentifier,
                new FullName(command.PrescriberLastName, command.PrescriberFirstName),
                new BelgianHealthcarePractitionerLicenseNumber(command.PrescriberLicenseNumber),
                BelgianSocialSecurityNumber.CreateIfNotEmpty(command.PrescriberSocialSecurityNumber),
                ToPrescriberContactInformation(command),
                command.PrescriberSpeciality,
                command.PrescriberDisplayName
            ));
 }
 private static Physician CreatePhysician(HealthcareProviderState state)
 {
     return new Physician
     (
         state.Identifier,
         FullName.FromState(state.FullName),
         new BelgianPractitionerLicenseNumber(state.LicenseNumber),
         BelgianSocialSecurityNumber.CreateIfNotEmpty(state.SocialSecurityNumber),
         ContactInformation.FromState(state.ContactInformation),
         state.Speciality,
         state.DisplayName
     );
 }
Пример #4
0
 public Patient Translate(PatientState state)
 {
     Condition.Requires(state, nameof(state)).IsNotNull();
     return(new Patient
            (
                state.Identifier,
                FullName.FromState(state.FullName),
                Enumeration.FromCode <BelgianSex>(state.Sex),
                BelgianSocialSecurityNumber.CreateIfNotEmpty(state.SocialSecurityNumber),
                ContactInformation.FromState(state.ContactInformation),
                state.Birthdate
            ));
 }