Open owencch opened 3 years ago
Seems like a specific instance of the more general case we'd need to support for #2732
Note: Bundle also has a very similar search parameter Bundle-message. Its just like Bundle-composition but for messages instead of documents.
@owencch given the cost of storing all search parameters from all contained resources in all cases, we're thinking it might be better for you to define your own custom search parameters for just the fields you want. For example, in this case you could introduce your own search parameter for Bundle-composition-status with an expressions like Bundle.where(type='document').entry[0].resource.as(Composition).status
. Let us know if you need some hints/examples for how to do that.
Yes, We need some hints/examples to illustrate how to do this, please let us know.
Lee Surprenant @.***> 於 2021年8月30日 週一 下午11:00寫道:
@owencch https://github.com/owencch given the cost of storing all contained resources in all cases, we thinking it might be better for you to define your own custom search parameters for just the fields you want. For example, in this case you could introduce your own search parameter for Bundle-composition-status with an expressions like Bundle.where(type='document').entry[0].resource.as(Composition).status. Let us know if you need some hints/examples for how to do that.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/IBM/FHIR/issues/2689#issuecomment-908415995, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD3LKEP4OQ3ZYR7WDLVRJTTT7OMKNANCNFSM5CI2EZYQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
@owencch the docs for that are at https://ibm.github.io/FHIR/guides/FHIRSearchConfiguration#11-tenant-specific-parameters. assuming your are using a single tenant named "default", you'd populate config/default/extension-search-parameters.json with a collection that has one or more custom search parameter definition.
There is an example in 1.1.1 of that guide and you can try modifying that into what you want. Something like this:
{
"resourceType": "Bundle",
"type": "collection",
"entry": [{
"fullUrl": "http://ibm.com/fhir/SearchParameter/Bundle-composition-status",
"resource": {
"resourceType": "SearchParameter",
"id": "Bundle-composition-status",
"url": "http://ibm.com/fhir/SearchParameter/Bundle-composition-status",
"version": "4.0.1",
"name": "composition-status",
"status": "draft",
"experimental": true,
"description": "The status of the Composition in this document bundle",
"code": "composition-status",
"base": ["Bundle"],
"type": "token",
"expression": "Bundle.where(type='document').entry[0].resource.as(Composition).status",
"multipleOr": true,
"multipleAnd": true,
"modifier": []
}
}
}
Then, after restarting the server and loading some document bundles (or re-indexing your existing ones), you should be able to search using this new parameter by issuing a GET like [base]/Bundle?composition-status=final
Suggestion to wait for #2901 to land before trying to tackle this one.
Lee Surprenant @.***>於 2021年8月31日 週二,下午10:24寫道:
@owencch https://github.com/owencch the docs for that are at https://ibm.github.io/FHIR/guides/FHIRSearchConfiguration#11-tenant-specific-parameters. assuming your are using a single tenant named "default", you'd populate config/default/extension-search-parameters.json with a collection that has one or more custom search parameter definition.
There is an example in 1.1.1 of that guide and you can try modifying that into what you want. Something like this:
{ "resourceType": "Bundle", "type": "collection", "entry": [{ "fullUrl": "http://ibm.com/fhir/SearchParameter/Bundle-composition-status", "resource": { "resourceType": "SearchParameter", "id": "Bundle-composition-status", "url": "http://ibm.com/fhir/SearchParameter/Bundle-composition-status", "version": "4.0.1", "name": "composition-status", "status": "draft", "experimental": true, "description": "The status of the Composition in this document bundle", "code": "composition-status", "base": ["Bundle"], "type": "token", "expression": "Bundle.where(type='document').entry[0].resource.as(Composition).status", "multipleOr": true, "multipleAnd": true, "modifier": [] } } }
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/IBM/FHIR/issues/2689#issuecomment-909286993, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD3LKELWI653N4RLPP2M6FTT7TQZZANCNFSM5CI2EZYQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
Adding some design notes issue2689DesignNotes.docx
Why can't the information be obtained in the second picture(Bundle?composition:Composition.status=final)? I tried both v4.7.1 and v4.8.3 and the results are the same (Total always is "0")