Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flag-status search parameter error #156

Open
agusenko opened this issue Sep 19, 2016 · 3 comments
Open

Flag-status search parameter error #156

agusenko opened this issue Sep 19, 2016 · 3 comments

Comments

@agusenko
Copy link

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
Copy link
Member

niquola commented Sep 22, 2016

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

@niquola
Copy link
Member

niquola commented Sep 22, 2016

Create SP by analogy with working one

@agusenko
Copy link
Author

It works! Thanks! ))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants