Package uk.nhs.interoperability.payloads.endoflifecarev1

Examples of uk.nhs.interoperability.payloads.endoflifecarev1.TextSections


   
    // ==== Now create the text sections ====
    template.setMainDocumentSectionID(CDAUUID.generateUUIDString());
   
    TextSection ts1 = createTextSection_Guardian(childScreeningFields);
    if (ts1 != null) template.addTextSections(new TextSections(ts1));
   
    TextSection ts2 = createTextSection_NewBornBirthDetails(childScreeningFields);
    if (ts2 != null) template.addTextSections(new TextSections(ts2));

   
   
    return template;
  }
View Full Code Here


 
  @Test
  public void testCreateDocumentMissingMandatoryFields() {
    EndOfLifeCareISBFields fields = new EndOfLifeCareISBFields();
    try {
      ClinicalDocument doc = EndOfLifeCareDocumentCreationHelper.createDocument(fields);
      fail("Expected exception was not thrown to list missing mandatory fields");
    } catch (MissingMandatoryFieldException e) {
      System.out.println(e.toString());
      // We expect 18 missing mandatory fields to be reported
      assertEquals(19, e.getMissingFields().size());
View Full Code Here

  @Test
  public void testCreateDocumentMinimal() {
    super.init("endoflifecare/", "EOLCHelper-serialiseMinimal", "EoLC Helper: Minimal Serialise", "This uses the EOLC Helper class to generate a full end of life care CDA document with a minimal set of fields, and serialises to a CDA document, which is compared with an expected document example.");
    try {
      // Use the helper to create the document
      ClinicalDocument doc = EndOfLifeCareDocumentCreationHelper.createDocument(minimal);
      // Serialise to a CDA XML Document
      String xml = doc.serialise();
     
      // Generate the rendered version
      super.render(xml);
     
      content = content.replaceAll("#TESTRESULT#", "<div class='pass'>PASS: Successfully created minimal CDA document</div>");
View Full Code Here

  @Test
  public void testCreateDocumentFull() {
    super.init("endoflifecare/", "EOLCHelper-serialiseFull", "EoLC Helper: Full Serialise", "This uses the EOLC Helper class to generate a full end of life care CDA document with a full set of fields, and serialises to a CDA document, which is compared with an expected document example.");
    try {
      // Use the helper to create the document
      ClinicalDocument doc = EndOfLifeCareDocumentCreationHelper.createDocument(full);
      // Serialise to a CDA XML Document
      String xml = doc.serialise();
      System.out.println(xml);
     
      // Generate the rendered version
      super.render(xml);
     
View Full Code Here

  @Test
  public void testMinimalDocumentSchemaCheck() {
    super.init("endoflifecare/", "EOLCHelper-MinimalSchemaCheck", "EoLC Helper: Minimal Schema Check", "This uses the EOLC Helper class to generate a full end of life care CDA document with a minimal set of fields, and serialises to a CDA document, which is validated against the on-the-wire schema.");
    try {
      // Use the helper to create the document
      ClinicalDocument doc = EndOfLifeCareDocumentCreationHelper.createDocument(minimal);
      // Serialise to a CDA XML Document
      String xml = doc.serialise();
      // Now check it is valid according to the schema
      testAgainstSchema(
          PropertyReader.getProperty("endoflifecareSchemaPath")+"POCD_MT000002UK01.xsd",
          xml);
     
View Full Code Here

  @Test
  public void testMinimalDocumentTemplatedSchemaCheck() {
    super.init("endoflifecare/", "EOLCHelper-MinimalTemplatedCheck", "EoLC Helper: Minimal Templated Check", "This uses the EOLC Helper class to generate a full end of life care CDA document with a minimal set of fields, and serialises to a CDA document, transforms it to templated format, which is validated against the templated schema.");
    try {
      // Use the helper to create the document
      ClinicalDocument doc = EndOfLifeCareDocumentCreationHelper.createDocument(minimal);
      // Serialise to a CDA XML Document
      String xml = doc.serialise();
      // And then transform and re-test against templated schema
      testAgainstTemplatedSchema(
          PropertyReader.getProperty("endoflifecareSchemaPath")+"POCD_MT021001GB01.xsd",
          xml);
     
View Full Code Here

  @Test
  public void testDocumentMinimalRoundTrip() {
    super.init("endoflifecare/", "EOLCParsingHelper-roundTripMinimal", "EoLC Parsing Helper: Round-Trip Minimal", "This uses the EOLC Helper class to generate a full end of life care CDA document with a minimal set of fields, then uses the EOLC Parsing helper to re-extract the values into the associate ISB fields, and checks they match the original values.");
    try {
      // Use the helper to create the document
      ClinicalDocument doc = EndOfLifeCareDocumentCreationHelper.createDocument(full);
      // Serialise to a CDA XML Document
      //String xml = doc.serialise();
     
      // Generate the rendered version
      //super.render(xml);
View Full Code Here

  @Test
  public void testCreateDocumentMinimal() {
    super.init("endoflifecare/", "EOLCHelper-CDGRSserialiseMinimal", "EoLC Helper: CDGRS Minimal Serialise", "This uses the EOLC Helper class to generate a full end of life care CDA document with a minimal set of fields, and serialises to a CDA document, which is compared with an expected document example.");
    try {
      // Use the helper to create the document
      ClinicalDocument doc = EndOfLifeCareDocumentCreationCDGRSHelper.createDocument(minimal);
      // Serialise to a CDA XML Document
      String xml = doc.serialise();
     
      // Generate the rendered version
      super.render(xml);
     
      content = content.replaceAll("#TESTRESULT#", "<div class='pass'>PASS: Successfully created minimal CDA document</div>");
View Full Code Here

  @Test
  public void testCreateDocumentFull() {
    super.init("endoflifecare/", "EOLCHelper-CDGRSserialiseFull", "EoLC Helper: CDGRS Full Serialise", "This uses the EOLC Helper class to generate a full end of life care CDA document with a full set of fields, and serialises to a CDA document, which is compared with an expected document example.");
    try {
      // Use the helper to create the document
      ClinicalDocument doc = EndOfLifeCareDocumentCreationCDGRSHelper.createDocument(full);
      // Serialise to a CDA XML Document
      String xml = doc.serialise();
      System.out.println(xml);
     
      // Generate the rendered version
      super.render(xml);
     
View Full Code Here

  @Test
  public void testCreateDocumentProposed() {
    super.init("endoflifecare/", "EOLCHelper-serialiseSWProposed", "EoLC Helper: SW Proposed Serialise", "This uses the EOLC Helper class to generate a full end of life care CDA document with a minimal set of fields, and serialises to a CDA document, which is compared with an expected document example.");
    try {
      // Use the helper to create the document
      ClinicalDocument doc = EndOfLifeCareDocumentCreationHelper.createDocument(proposed);
      // Serialise to a CDA XML Document
      String xml = doc.serialise();
     
      // Generate the rendered version
      super.render(xml);
     
      // Re-serialised (for documentation purposes)
      ClinicalDocument doc2 = new ClinicalDocument();
      doc2.parse(xml);
     
      content = content.replaceAll("#TESTRESULT#", "<div class='pass'>PASS: Successfully created CDA document</div>");
      content = content.replaceAll("#EXPECTED#", "");
      addActualResultWithXML(xml);
     
View Full Code Here

TOP

Related Classes of uk.nhs.interoperability.payloads.endoflifecarev1.TextSections

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.