use of uk.gov.hscic.telecom.TelecomEntity in project gpconnect-demonstrator by nhsconnect.
the class PatientDetailsToEntityTransformer method populateTelecoms.
/**
* details to entity
* there must be a better way ..
* @param patientDetails
* @param patientEntity
*/
private void populateTelecoms(PatientDetails patientDetails, PatientEntity patientEntity) {
ArrayList<TelecomEntity> al = new ArrayList<>();
if (patientDetails.getTelecoms() != null) {
for (TelecomDetails telecomDetails : patientDetails.getTelecoms()) {
TelecomEntity telecomEntity = new TelecomEntity();
// this has to be populated even though its wrong and get ovewritten with the correct value later
telecomEntity.setPatientId(1L);
telecomEntity.setSystem(telecomDetails.getSystem());
telecomEntity.setUseType(telecomDetails.getUseType());
telecomEntity.setValue(telecomDetails.getValue());
al.add(telecomEntity);
}
}
patientEntity.setTelecoms(al);
}
use of uk.gov.hscic.telecom.TelecomEntity in project gpconnect-demonstrator by nhsconnect.
the class PatientEntityToDetailsTransformer method populateTelecoms.
/**
* entity to details
* there must be a better way ..
* @param patientDetails
* @param patientEntity
*/
private void populateTelecoms(PatientDetails patientDetails, PatientEntity patientEntity) {
ArrayList<TelecomDetails> al = new ArrayList<>();
if (patientEntity.getTelecoms() != null) {
for (TelecomEntity telecomEntity : patientEntity.getTelecoms()) {
TelecomDetails telecomDetails = new TelecomDetails();
telecomDetails.setSystem(telecomEntity.getSystem());
telecomDetails.setUseType(telecomEntity.getUseType());
telecomDetails.setValue(telecomEntity.getValue());
al.add(telecomDetails);
}
}
patientDetails.setTelecoms(al);
}
Aggregations