# All files / blue-button/lib/parser/ccda/sections hospital_discharge_instructions.js

100% Statements 24/24
100% Branches 1/1
100% Functions 1/1
100% Lines 24/24

Press n or j to go to the next uncovered block, b, p or k for the previous block.

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    251x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    22x
    22x
    22x
    22x
    22x
    22x
    22x
    22x
    22x
    22x
    22x
    22x
    22x
    1x
    1x
     "use strict";

    var shared = require("../shared");
    var component = require("@amida-tech/blue-button-xml").component.withNullFlavor();
    var processor = require("@amida-tech/blue-button-xml").processor;
    var cleanup = require("../cleanup");
    var bbm = require("@amida-tech/blue-button-meta");

    var exportHospitalDischargeInstructionsSection = function (version) {
      var sectionIDs = bbm.CCDA["sections" + version];
      var clinicalStatementsIDs = bbm.CCDA["statements" + version];

      var hospital_discharge_instructions_section = component.define("HospitalDischargeInstructionsSection");
      hospital_discharge_instructions_section.templateRoot([sectionIDs.HospitalDischargeInstructionsSection]);
      hospital_discharge_instructions_section.fields([
        //["code", "1..1", "h:code", shared.ConceptDescriptor],
        ["title", "0..1", "h:title", shared.TextWithReference],
        ["text", "0..1", "h:text", processor.asXmlString]

      ]);
      return [hospital_discharge_instructions_section];
    };

    exports.hospital_discharge_instructions_section = exportHospitalDischargeInstructionsSection;