-
Notifications
You must be signed in to change notification settings - Fork 15
Description
Jim's PR also takes care of renaming to
fhir:lfor ShEx. I can see that it addsfhir:lto canonical, oid, url, uuid, and uri. And it does this for canonical references (example) and CodeableReferences (example) too.ShEx has a few things missing for this. Just to confirm,
<Reference>already specified that anIRI?should be used withfhir:l. We can do the same for<uri>to be consistent, which the other primitive types derive from.<CodeableReference> EXTENDS @<DataType> CLOSED { a [fhir:CodeableReference]?; fhir:concept @<CodeableConcept>?; fhir:reference @<Reference>?; } <Reference> EXTENDS @<DataType> CLOSED { a [fhir:Reference]?; fhir:l IRI?; # <------------------------------------ this was already here fhir:reference @<string>?; fhir:type @<uri>?; fhir:identifier @<Identifier>?; fhir:display @<string>?; } <canonical> EXTENDS @<uri> CLOSED { a [fhir:canonical]?; } <oid> EXTENDS @<uri> CLOSED { a [fhir:oid]?; } <url> EXTENDS @<uri> CLOSED { a [fhir:url]?; } <uuid> EXTENDS @<uri> CLOSED { a [fhir:uuid]?; } <uri> EXTENDS @<PrimitiveType> CLOSED { a [fhir:uri]?; + fhir:l IRI?; fhir:v xsd:anyURI?; } <string> EXTENDS @<PrimitiveType> CLOSED { a [fhir:string]?; fhir:v xsd:string MAXLENGTH 1048576?; }More importantly, we're missing type restrictions on profiles for canonical and CodeableReference.
ActivityDefinition is a good example that uses all types of references:<ActivityDefinition> EXTENDS @<DomainResource> CLOSED { a [fhir:ActivityDefinition]?; # ... fhir:url @<uri>?; # ... fhir:subject @<CodeableConcept> OR (@<Reference> AND {fhir:link @<Group> OR @<MedicinalProductDefinition> OR @<SubstanceDefinition> OR @<AdministrableProductDefinition> OR @<ManufacturedItemDefinition> OR @<PackagedProductDefinition> }) OR (@<canonical> AND { fhir:l @<EvidenceVariable> }) ?; # good - fhir:library @<OneOrMore_canonical>?; + fhir:library @<OneOrMore_canonical_Library>?; # ... - fhir:profile @<canonical>?; - fhir:profile @<canonical> AND { fhir:l @<StructureDefinition> } ?; # ... - fhir:location @<CodeableReference>?; + fhir:location (@<CodeableReference> AND {fhir:reference @<Reference> AND {fhir:l @<Location> } }) ?; # ... fhir:product (@<Reference> AND {fhir:link @<Medication> OR @<Ingredient> OR @<Substance> OR @<SubstanceDefinition> }) OR @<CodeableConcept> ?; } +<OneOrMore_canonical_Library> CLOSED { + rdf:first @<canonical_Library> ; + rdf:rest [rdf:nil] OR @<OneOrMore_canonical_Library> +} +<canonical_Library> EXTENDS @<canonical> CLOSED { + a [fhir:canonical]?; # is this correct? + fhir:l @<Library>; +}The OWL ontology will have
fhir:lrestrictions for Reference (and therefore CodeableReference) and canonical. It won't have restrictions forfhir:lonfhir:urisince it could be anything when generically used. But that change is part of #177