use of org.hl7.gravity.refimpl.sdohexchange.fhir.factory.characteristic.RaceBundleFactory in project Gravity-SDOH-Exchange-RI by FHIR.
the class PersonalCharacteristicsService method createEthnicityBundleFactory.
private PersonalCharacteristicBundleFactory createEthnicityBundleFactory(NewPersonalCharacteristicDto dto) {
EthnicityBundleFactory raceBundleFactory = new EthnicityBundleFactory(dto.getType(), dto.getMethod());
raceBundleFactory.setMethodDetail(dto.getMethodDetail());
if (dto.getValue() != null) {
raceBundleFactory.setValue(EthnicityCode.fromCode(dto.getValue()));
}
raceBundleFactory.setDetailedValues(dto.getDetailedValues());
raceBundleFactory.setDescription(dto.getDescription());
return raceBundleFactory;
}
use of org.hl7.gravity.refimpl.sdohexchange.fhir.factory.characteristic.RaceBundleFactory in project Gravity-SDOH-Exchange-RI by FHIR.
the class PersonalCharacteristicsService method createRaceBundleFactory.
private PersonalCharacteristicBundleFactory createRaceBundleFactory(NewPersonalCharacteristicDto dto) {
RaceBundleFactory raceBundleFactory = new RaceBundleFactory(dto.getType(), dto.getMethod());
raceBundleFactory.setMethodDetail(dto.getMethodDetail());
if (dto.getValues() != null) {
raceBundleFactory.setValues(Lists.newArrayList(dto.getValues()).stream().map(RaceCode::fromCode).toArray(RaceCode[]::new));
}
raceBundleFactory.setDetailedValues(dto.getDetailedValues());
raceBundleFactory.setDescription(dto.getDescription());
return raceBundleFactory;
}
Aggregations