Skip to content

Commit

Permalink
typofix in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
niquola committed May 25, 2016
1 parent 7b6d964 commit 3286e94
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
10 changes: 2 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,16 +199,10 @@ myClient.create(entry,

```

### Tags Operations

### Search

`fhir.search('Patient', queryObject, callback, errback)` function is used
for [FHIR resource's search](http://www.hl7.org/implement/standards/fhir/search.html).

If success callback will be called with resulting [bundle](http://www.hl7.org/implement/standards/fhir/json.html#bundle).

For queryObject syntax `fhir.js` adopts
fhir.search({type: resourceType, query: queryObject}),
where queryObject syntax `fhir.js` adopts
mongodb-like query syntax ([see](http://docs.mongodb.org/manual/tutorial/query-documents/)):

```javascript
Expand Down
6 changes: 5 additions & 1 deletion test/querySpec.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ describe "test params builder", ->
$sort: [['name','asc'],['birthDate','desc'], 'vip']),
'_sort:asc=name&_sort:desc=birthDate&_sort=vip')

assert.deepEqual(
subject(subject: "id", questionnaire: "Allergies", _count: 1, $sort: [["authored", "desc"]]),
'subject=id&questionnaire=Allergies&_count=1&_sort:desc=authored')


it "include", ->
assert.deepEqual(subject($include: {Observation: "related.component", Patient: ["link.other", "careProvider"]}),
'_include=Observation.related.component&_include=Patient.link.other&_include=Patient.careProvider')
Expand All @@ -64,4 +69,3 @@ describe "test params builder", ->
assert.deepEqual(subject(name: {$or: ['bill', 'ted']}),
'name=bill%2Cted')


0 comments on commit 3286e94

Please sign in to comment.