Replies: 1 comment
|
Detailed Proposal with Examples ContextWe currently represent SQLQuery as a Library (content + dependencies + parameters) and define Option A — Keep Library as the SQLQuery definition (current approach)Why it fits
Example: SQLQuery Library {
"resourceType": "Library",
"meta": { "profile": ["https://sql-on-fhir.org/ig/StructureDefinition/SQLQuery"] },
"type": { "coding": [{ "system": "https://sql-on-fhir.org/ig/CodeSystem/LibraryTypesCodes", "code": "sql-query" }] },
"name": "PatientBloodPressure",
"status": "active",
"relatedArtifact": [
{ "type": "depends-on", "resource": "https://example.org/ViewDefinition/patient_view", "label": "patient" },
{ "type": "depends-on", "resource": "https://example.org/ViewDefinition/bp_view", "label": "bp" }
],
"parameter": [
{ "name": "patient_id", "type": "string", "use": "in" },
{ "name": "from_date", "type": "date", "use": "in" }
],
"content": [{
"contentType": "application/sql",
"title": "SELECT patient.id, bp.systolic FROM patient JOIN bp ON patient.id = bp.patient_id WHERE patient.id = :patient_id AND bp.effective_date >= :from_date",
"data": "U0VMRUNUIHBhdGllbnQuaWQsIGJwLnN5c3RvbGljIEZST00gcGF0aWVudCBKT0lOIGJwIE9OIHBhdGllbnQuaWQgPSBicC5wYXRpZW50X2lkIFdIRVJFIHBhdGllbnQuaWQgPSA6cGF0aWVudF9pZCBBTkQgYnAuZWZmZWN0aXZlX2RhdGUgPj0gOmZyb21fZGF0ZQ=="
}]
}Execution
Option B — Replace Library with OperationDefinitionHow it might look
Concerns
Option C — Add a named query OperationDefinition (
|
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Context: considering whether SQLQuery should remain a Library (query definition + content + dependencies) with a separate $sqlquery-run OperationDefinition, or be replaced by an OperationDefinition (possibly kind=query / _query).
Questions:
Notes: Library currently carries SQL attachments (dialect variants), relatedArtifact dependencies (ViewDefinitions), and parameters. OperationDefinition is execution-oriented. Want community input before changing direction.
All reactions