if (fields.getDateOfBloodSpotScreening() == null) {
return null;
}
BloodSpotScreening template = new BloodSpotScreening();
template.setId(CDAUUID.generateUUIDString());
template.setEffectiveTime(fields.getDateOfBloodSpotScreening());
// Performer
template.setSampleCollectedTime(fields.getBloodSpotSampleCollectedTime());
template.addPerformerPersonId(new PersonID().setID(fields.getBloodSpotPerformerPersonSDSID()).setType(PersonIDType.SDSID.code));
template.setPerformerPersonName(fields.getBloodSpotPerformerPersonName());
template.setPerformerOrgId(new OrgID()
.setID(fields.getBloodSpotPerformerOrganisationODSID())
.setType(OrgIDType.ODSOrgID.code));
template.setPerformerOrgName(fields.getBloodSpotPerformerOrganisationName());
// Lab
template.setTimeReceivedAtLab(fields.getBloodSpotTimeReceivedAtLab());
template.setLabOrganisationId(new OrgID()
.setID(fields.getBloodSpotLabOrganisationODSID())
.setType(OrgIDType.ODSOrgID.code));
template.setLabOrganisationDescription(fields.getBloodSpotLabOrganisationName());
// Screening results
template.setPKUScreeningValue(fields.getPKUScreeningValue());
if (fields.getLaboratoryConfirmPKUasCorrect()) {
template.setPKUBSLaboratoryInterpretationCode(BSLaboratoryInterpretationCode._ReevaluatedResultLaboratoryConfirmasCorrect);
}
template.setPKUScreeningSubStatus(fields.getPKUScreeningSubStatus());
template.setPKUReasonText(fields.getPKUReasonText());
template.setPKUSupplementaryText(fields.getPKUSupplementaryText());
template.setSCDScreeningValue(fields.getSCDScreeningValue());
if (fields.getLaboratoryConfirmSCDasCorrect()) {
template.setSCDBSLaboratoryInterpretationCode(BSLaboratoryInterpretationCode._ReevaluatedResultLaboratoryConfirmasCorrect);
}
template.setSCDScreeningSubStatus(fields.getSCDScreeningSubStatus());
template.setSCDReasonText(fields.getSCDReasonText());
template.setSCDSupplementaryText(fields.getSCDSupplementaryText());
template.setCFScreeningValue(fields.getCFScreeningValue());
if (fields.getLaboratoryConfirmCFasCorrect()) {
template.setCFBSLaboratoryInterpretationCode(BSLaboratoryInterpretationCode._ReevaluatedResultLaboratoryConfirmasCorrect);
}
template.setCFScreeningSubStatus(fields.getCFScreeningSubStatus());
template.setCFReasonText(fields.getCFReasonText());
template.setCFSupplementaryText(fields.getCFSupplementaryText());
template.setCHTScreeningValue(fields.getCHTScreeningValue());
if (fields.getLaboratoryConfirmCHTasCorrect()) {
template.setCHTBSLaboratoryInterpretationCode(BSLaboratoryInterpretationCode._ReevaluatedResultLaboratoryConfirmasCorrect);
}
template.setCHTScreeningSubStatus(fields.getCHTScreeningSubStatus());
template.setCHTReasonText(fields.getCHTReasonText());
template.setCHTSupplementaryText(fields.getCHTSupplementaryText());
template.setMCADDScreeningValue(fields.getMCADDScreeningValue());
if (fields.getLaboratoryConfirmMCADDasCorrect()) {
template.setMCADDBSLaboratoryInterpretationCode(BSLaboratoryInterpretationCode._ReevaluatedResultLaboratoryConfirmasCorrect);
}
template.setMCADDScreeningSubStatus(fields.getMCADDScreeningSubStatus());
template.setMCADDReasonText(fields.getMCADDReasonText());
template.setMCADDSupplementaryText(fields.getMCADDSupplementaryText());
// Other observations
template.setScreeningLocationStatus(fields.getScreeningLocationStatus());
template.setLaboratoryCardSerialNumber(fields.getLaboratoryCardSerialNumber());
template.setPreviousLaboratoryCardSerialNumber(fields.getPreviousLaboratoryCardSerialNumber());
return template;
}