return null;
}
@Override
public boolean preProcessSerialise(XMLNamespaceContext namespaces, Object itemObject, String xpath, Element parent, Document xmldoc, Field field, Payload payload) {
Code item = (Code)itemObject;
Logger.trace(" Serialising FHIR coded item - code = " + item.getCode());
boolean suppressCodeSystem = field.isSuppressCodeSystem();
// First create the @code node:
Field stringValueField = new Field();
stringValueField.setType("String");
stringValueField.setName("Coded Item Value");
PayloadSerialiser.createNode(namespaces, xpath + "/x:value/@value", parent, xmldoc, item.getCode(), new StringHandler(), stringValueField, payload);
String displayName = item.getDisplayName();
//String reference = item.getReference();
if (displayName != null) {
PayloadSerialiser.createNode(namespaces, xpath + "/x:label/@value", parent, xmldoc, displayName, new StringHandler(), stringValueField, payload);
}
//if (reference != null) {
// PayloadSerialiser.createNode(namespaces, xpath + "/x:originalText/x:reference/@value", parent, xmldoc, reference, new StringHandler(), stringValueField, payload);
//}
String oid = item.getOID();
if (oid != null) {
// Add oid prefix
oid = FHIRUtils.addOIDPrefix(oid);
if (!suppressCodeSystem) {
PayloadSerialiser.createNode(namespaces, xpath + "/x:system/@value", parent, xmldoc, oid, new StringHandler(), stringValueField, payload);