Package uk.nhs.interoperability.payloads

Examples of uk.nhs.interoperability.payloads.Code


    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);
View Full Code Here


    } else {
      // The OID is derived from another coded field - try to populate it
      String fieldToDeriveFrom = field.getDeriveOIDFrom();
      Object val = p.getValue(fieldToDeriveFrom);
      if (val != null) {
        Code codeVal = (Code)val;
        codeSystem = codeVal.getOID();
      }
    }
    Logger.trace("  Processed coded item: " + field.getName() + ", found value: " + code);
    if (code != null) {
      // If enabled, output an entry in an XPath Report
View Full Code Here

    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 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 + "/@code", parent, xmldoc, item.getCode(), new StringHandler(), stringValueField, payload);
    String displayName = item.getDisplayName();
    String reference = item.getReference();
    if (displayName != null) {
      PayloadSerialiser.createNode(namespaces, xpath + "/@displayName", 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) {
      if (!suppressCodeSystem) {
        PayloadSerialiser.createNode(namespaces, xpath + "/@codeSystem", parent, xmldoc, oid, new StringHandler(), stringValueField, payload);
      }
    } else {
View Full Code Here

TOP

Related Classes of uk.nhs.interoperability.payloads.Code

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.