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

custom Subscriber searchparameter for resource Coverage fails :((( #147

Open
algusen opened this issue Aug 17, 2016 · 3 comments
Open

custom Subscriber searchparameter for resource Coverage fails :((( #147

algusen opened this issue Aug 17, 2016 · 3 comments

Comments

@algusen
Copy link

algusen commented Aug 17, 2016

We added a new custom searchparameter - subscriber:

INSERT INTO searchparameter(id,version_id, resource_type, resource, created_at, updated_at)
VALUES ('Coverage-subscriber','Coverage-subscriber','SearchParameter'
,'{
"id": "Coverage-subscriber",
"url": "http://hl7.org/fhir/SearchParameter/Coverage-subscriber",
"base": "Coverage",
"code": "subscriber",
"date": "2016-05-11T13:22:00+00:00",
"name": "subscriber",
"type": "reference",
"xpath": "f:Coverage/f:subscriber",
"target": ["Patient"],
"contact": [{
"telecom": [{
"value": "http://hl7.org/fhir",
"system": "other"
}]
},
{
"telecom": [{
"value": "http://www.hl7.org/Special/committees/fiwg/index.cfm",
"system": "other"
}]
}],
"publisher": "Health Level Seven International (FHIR Infrastructure)",
"xpathUsage": "normal",
"description": "subscriber",
"resourceType": "SearchParameter"
}'::jsonb

,CURRENT_TIMESTAMP,CURRENT_TIMESTAMP);

But

SELECT fhir_search('{"resourceType": "Coverage", "queryString": "subscriber=02255d1f-548c-4b04-9ac2-7c97d3efad1a"}');

or

SELECT fhir_index_parameter('{"resourceType": "Coverage", "name": "subscriber"}');

fail with the following error:

[Err] ERROR: Error: MetaIndex: Element [["Coverage","subscriber"]] -> Patient.subscriber not found
DETAIL: plv8_init() LINE 3641: throw new Error("MetaIndex: Element [" + (JSON.stringify(path)) + "] -

What's wrong with the subscriber parameter??

@niquola
Copy link
Member

niquola commented Aug 17, 2016

Looks like there is no Coverage.subscriber element in fhirbase FHIR metadata. I think we should update it. Do you use STU3? To quick fix just update Coverage StructureDefinition with new one.

@Semalexa
Copy link
Contributor

Semalexa commented Sep 1, 2016

Coverage.subscriber was in FHIR v1.0.2. In FHIR v1.4.0 this field was removed, now there are Coverage.planholder[x] (planholderIdentifier, planholderReference) and beneficiary[x] (beneficiaryIdentifier, beneficiaryReference).
So the search should be like [base]/fhir/Coverage?beneficiaryreference=Patient/<id>

@agusenko
Copy link

Which release of fhirbase to take for HL7+FHIR DSTU2 (v1.0.2-7202) standard?

We work with standard HL7+FHIR DSTU2 (v1.0.2-7202) (http://hl7.org/fhir/), so which release of fhirbase should I take for my new database to follow this standard? Just now I took simply the last one (v.1.4.0.0), is it correct?

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

4 participants