@prefix fhir: <http://hl7.org/fhir/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

# - resource -------------------------------------------------------------------

<https://openrecruit.dev/fhir/Library/sql-query-library-example> a fhir:Library ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:Resource.id [ fhir:value "sql-query-library-example"] ;
  fhir:Resource.meta [
     fhir:Meta.profile [
       fhir:value "https://openrecruit.dev/fhir/StructureDefinition/sql-query-library" ;
       fhir:index -1 ;
       fhir:link <https://openrecruit.dev/fhir/StructureDefinition/sql-query-library>
     ]
  ] ;
  fhir:Resource.language [ fhir:value "en"] ;
  fhir:DomainResource.text [
     fhir:Narrative.status [ fhir:value "extensions" ] ;
     fhir:Narrative.div "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n  <table class=\"narrative-table\">\n    <tbody>\n<tr>\n\n\n<th colspan=\"2\" scope=\"row\" class=\"row-header\"><a name=\"metadata\"> </a>Metadata</th>\n\n\n</tr>\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Title</th>\n\n\n\n<td class=\"content-container\">All patients</td>\n\n\n</tr>\n\n\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Version</th>\n\n\n\n<td class=\"content-container\">11.3.0</td>\n\n\n</tr>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Steward (Publisher)</th>\n\n\n\n<td class=\"content-container\">The recruIT Developers</td>\n\n\n</tr>\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Steward Contact</th>\n\n\n\n<td class=\"content-container\">The recruIT Developers</td>\n\n\n</tr>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Type</th>\n\n\n\n<td class=\"content-container\">\n    <a href=\"https://simplifier.net/resolve?scope=de.medizininformatikinitiative.kerndatensatz.studie@2026.0.2&amp;canonical=https://sql-on-fhir.org/ig/CodeSystem/LibraryTypesCodes\">https://sql-on-fhir.org/ig/CodeSystem/LibraryTypesCodes</a>#sql-query\n\n\n</td>\n\n\n</tr>\n\n\n\n\n\n\n\n\n\n\n\n\n\n<tr>\n\n\n<th colspan=\"2\" scope=\"row\" class=\"row-header\"><a name=\"parameters\"> </a>Parameters</th>\n\n\n</tr>\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Parameter</th>\n\n\n\n<td class=\"content-container\">None</td>\n\n\n</tr>\n\n\n\n\n\n\n\n\n  <tr>\n\n\n<th colspan=\"2\" scope=\"row\" class=\"row-header\">Library Content</th>\n\n\n</tr>\n  \n    \n    <tr>\n      <th scope=\"row\" class=\"row-header\">application/sql;dialect=trinoContent</th>\n      <td>\n        <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code>Encoded data </code></pre>\n      </td>\n    </tr>\n    \n  \n\n\n\n<tr>\n  <th colspan=\"2\" scope=\"row\" class=\"row-header\">Generated using version 0.5.6 of the sample-content-ig Liquid templates</th>\n</tr>\n\n    </tbody>\n  </table>\n</div>"
  ] ;
  fhir:Library.url [ fhir:value "https://openrecruit.dev/fhir/Library/sql-query-library-example"] ;
  fhir:Library.version [ fhir:value "11.3.0"] ;
  fhir:Library.name [ fhir:value "all-patients"] ;
  fhir:Library.title [ fhir:value "All patients"] ;
  fhir:Library.status [ fhir:value "active"] ;
  fhir:Library.type [
     fhir:CodeableConcept.coding [
       fhir:index -1 ;
       fhir:Coding.system [ fhir:value "https://sql-on-fhir.org/ig/CodeSystem/LibraryTypesCodes" ] ;
       fhir:Coding.code [ fhir:value "sql-query" ]
     ]
  ] ;
  fhir:Library.date [ fhir:value "2026-12-01T18:57:23+00:00"^^xsd:dateTime] ;
  fhir:Library.publisher [ fhir:value "The recruIT Developers"] ;
  fhir:Library.contact [
     fhir:index -1 ;
     fhir:ContactDetail.name [ fhir:value "The recruIT Developers" ] ;
     fhir:ContactDetail.telecom [
       fhir:index -1 ;
       fhir:ContactPoint.system [ fhir:value "url" ] ;
       fhir:ContactPoint.value [ fhir:value "https://openrecruit.dev" ]
     ]
  ] ;
  fhir:Library.content [
     fhir:index -1 ;
     fhir:Element.extension [
       fhir:index -1 ;
       fhir:Extension.url [ fhir:value "https://sql-on-fhir.org/ig/StructureDefinition/sql-text" ] ;
       fhir:Extension.valueString [ fhir:value "SELECT patient.id AS patient_id, TRUE AS is_met FROM fhir.default.patient AS patient" ]
     ] ;
     fhir:Attachment.contentType [ fhir:value "application/sql;dialect=trino" ] ;
     fhir:Attachment.data [ fhir:value "U0VMRUNUIHBhdGllbnQuaWQgQVMgcGF0aWVudF9pZCwgVFJVRSBBUyBpc19tZXQgRlJPTSBmaGlyLmRlZmF1bHQucGF0aWVudCBBUyBwYXRpZW50"^^xsd:base64Binary ]
  ] .

# - ontology header ------------------------------------------------------------

<https://openrecruit.dev/fhir/Library/sql-query-library-example.ttl> a owl:Ontology ;
  owl:imports fhir:fhir.ttl .

# -------------------------------------------------------------------------------------

