fhirbase / fhirbase-plv8

[DEPRECATED] Fhirbase 2.0 is an FHIR relational storage
https://health-samurai.io/fhirbase
Other
105 stars 39 forks source link

Flag-status search parameter error #156

Open agusenko opened 8 years ago

agusenko commented 8 years ago

I added a custom search parameter Flag-status:

insert into searchparameter(id,version_id,resource,created_at,updated_at) values ( 'Flag-status','Flag-status-1', ' {"id": "Flag-status", "url": "http://hl7.org/fhir/SearchParameter/Flag-status", "base": "Flag", "code": "status", "date": "2016-03-31T08:01:25+11:00", "name": "status", "type": "string", "xpath": "f:Flag/f:status", "contact": [{"telecom": [{"value": "http://hl7.org/fhir", "system": "other"}]}, {"telecom": [{"value": "http://www.hl7.org/Special/committees/pafm/index.cfm", "system": "other"}]}], "publisher": "Health Level Seven International (Flag Administration)", "expression": "Flag.status", "xpathUsage": "normal", "description": "status of the Flag", "resourceType": "SearchParameter"} ' , current_timestamp,current_timestamp );

But this fhir_search query: SELECT fhir_search('{"resourceType": "Flag", "queryString": "status=active"}');

throws an error Error: NORMALIZE: Not registered search type [code]

What did I do wrong?

niquola commented 8 years ago

Alex, read the code, looks like you missed some essential attribute in searchparameter.

niquola commented 8 years ago

Create SP by analogy with working one

agusenko commented 8 years ago

It works! Thanks! ))