Skip to content

Commit

Permalink
test: add test on encounter search by status
Browse files Browse the repository at this point in the history
  • Loading branch information
danil committed Mar 31, 2016
1 parent 635c269 commit c559ce0
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions test/fhir/search_spec.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -243,3 +243,26 @@ describe 'Search', ->
/No parser for special - lastUpdated/.test(err)
)
)

describe 'Encounter search', ->
before ->
plv8.execute("SET plv8.start_proc = 'plv8_init'")
schema.fhir_drop_storage(plv8, resourceType: 'Encounter')
schema.fhir_create_storage(plv8, resourceType: 'Encounter')

beforeEach ->
schema.fhir_truncate_storage(plv8, resourceType: 'Encounter')
crud.fhir_create_resource(plv8, resource: {
resourceType: 'Encounter',
status: 'planned'
})
crud.fhir_create_resource(plv8, resource: {
resourceType: 'Encounter',
status: 'finished'
})

it 'by status', ->
assert.equal(
search.fhir_search(plv8,
resourceType: 'Encounter', queryString: 'status=finished').total,
1)

0 comments on commit c559ce0

Please sign in to comment.