Sha256: 0e12436787df307f971b027880fb058fb01a039e7205ae7475eccdd5be679e66

Contents?: true

Size: 947 Bytes

Versions: 1

Compression:

Stored size: 947 Bytes

Contents

require_relative '../test_helper'
require 'hquery-patient-api'

class JSObjectTest < Test::Unit::TestCase

  def setup
  end

  def test_library_functions_with_crosswalk
    result = HQMF2JS::Generator::JS.library_functions(true)
    assert !result.match(/CROSSWALK EXTENSION/).nil?
    assert !result.match(/CrosswalkManager/).nil?
  end

  def test_js_initialize_specifics
    js = HQMF2JS::Generator::JS.new nil
    criteria = HQMF::DataCriteria.from_json(nil, JSON.parse(File.read(File.join('test','fixtures','json','data_criteria','specific_occurrence.json'))))
    expected = "hqmfjs.initializeSpecifics = function(patient_api, hqmfjs) { hqmf.SpecificsManager.initialize(patient_api,hqmfjs,{\"id\":\"\",\"type\":\"ENCOUNTER_PERFORMED_INPATIENT_ENCOUNTER\",\"function\":\"OccurrenceAInpatientEncounter1\"}) }"
    result = js.js_initialize_specifics([criteria])
    result.must_equal expected
  end

  def test_to_js_without_codes
  end


end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hqmf2js-1.3.0 test/unit/js_object_test.rb