fix up cvx importer

This commit is contained in:
Grahame Grieve 2024-01-18 11:40:12 +11:00
parent 79f3fbb93c
commit 26aef43278
1 changed files with 3 additions and 3 deletions

View File

@ -66,7 +66,7 @@ public class CVXImporter {
Element cvxCodes = xml.getDocumentElement(); Element cvxCodes = xml.getDocumentElement();
for (Element cvsInfo : XMLUtil.getNamedChildren(cvxCodes, "CVXInfo")) { for (Element cvsInfo : XMLUtil.getNamedChildren(cvxCodes, "CVXInfo")) {
String desc = XMLUtil.getNamedChildText(cvsInfo, "ShortDescription").trim(); String desc = XMLUtil.getNamedChildText(cvsInfo, "ShortDescription").trim();
String name = XMLUtil.getNamedChildText(cvsInfo, "FullVaccinename").trim(); String fullName = XMLUtil.getNamedChildText(cvsInfo, "FullVaccinename").trim();
String code = XMLUtil.getNamedChildText(cvsInfo, "CVXCode").trim(); String code = XMLUtil.getNamedChildText(cvsInfo, "CVXCode").trim();
String notes = XMLUtil.getNamedChildText(cvsInfo, "Notes"); String notes = XMLUtil.getNamedChildText(cvsInfo, "Notes");
String status = XMLUtil.getNamedChildText(cvsInfo, "Status").trim(); String status = XMLUtil.getNamedChildText(cvsInfo, "Status").trim();
@ -78,8 +78,8 @@ public class CVXImporter {
} else { } else {
def.getDesignation().clear(); def.getDesignation().clear();
} }
def.setDisplay(name); def.setDisplay(desc);
def.addDesignation().setValue(desc).setLanguage("en").setUse(new Coding().setSystem("http://snomed.info/sct").setCode("900000000000013009").setDisplay("Synonym")); def.addDesignation().setValue(fullName).setLanguage("en").setUse(new Coding().setSystem("http://snomed.info/sct").setCode("900000000000013009").setDisplay("Synonym"));
if (!Utilities.noString(notes)) { if (!Utilities.noString(notes)) {
def.forceProperty("notes").setValue(new StringType(notes.trim())); def.forceProperty("notes").setValue(new StringType(notes.trim()));
} }