Skip to content

Commit

Permalink
Updates based on feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
bkaney committed Oct 12, 2023
1 parent 41025f5 commit dd4d282
Show file tree
Hide file tree
Showing 12 changed files with 110 additions and 53 deletions.
8 changes: 4 additions & 4 deletions input/fsh/metadata.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ RuleSet: DefinitionMetadata
* experimental = false
* status = #draft

RuleSet: CanonicalOperationProfile
* meta.profile[+] = Canonical(CanonicalOperation)
RuleSet: ArtifactOperationProfile
* meta.profile[+] = Canonical(ArtifactOperation)

RuleSet: ArtifactEndpoingConfigurableOperationProfile
* meta.profile[+] = Canonical(ArtifactEndpointConfigurableOperation)
Expand All @@ -24,5 +24,5 @@ RuleSet: ManifestableOperationProfile
RuleSet: PageableOperationProfile
* meta.profile[+] = Canonical(PageableOperation)

RuleSet: VersionBindableOperationProfile
* meta.profile[+] = Canonical(VersionBindableOperation)
RuleSet: ArtifactVersionBindableOperationProfile
* meta.profile[+] = Canonical(ArtifactVersionBindableOperation)
20 changes: 10 additions & 10 deletions input/fsh/operation-definitions/data-requirements-operation.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ InstanceOf: OperationDefinition
Title: "CRMI Data Requirements Operation"
Usage: #definition
* insert DefinitionMetadata
* insert CanonicalOperationProfile
* insert VersionBindableOperationProfile
* insert ArtifactOperationProfile
* insert ArtifactVersionBindableOperationProfile
* insert ManifestableOperationProfile
* name = "CRMIDataRequirements"
* title = "CRMI Data Requirements"
Expand Down Expand Up @@ -124,7 +124,7 @@ NOTE: Does this only apply to Library resource types?
"""
* parameter[=].type = #Parameters

* parameter[+].name = #canonicalVersion
* parameter[+].name = #artifactVersion
* parameter[=].use = #in
* parameter[=].min = 0
* parameter[=].max = "*"
Expand All @@ -136,12 +136,12 @@ the resource does not already specify a version. The format is the same as a can
Note that this is a generalization of the `system-version` parameter to the $expand operation
to apply to any canonical resource, including code systems.
"""
* parameter[=].type = #canonical
* parameter[=].type = #uri

* parameter[+].name = #checkCanonicalVersion
* parameter[+].name = #checkArtifactVersion
* parameter[=].use = #in
* parameter[=].min = 0
* parameter[=].max = "*"
* parameter[=].max = "1"
* parameter[=].documentation = """
Edge Case: Specifies a version to use for a canonical resource. If the artifact referencing
the resource specifies a different version, an error is returned instead of the package. The
Expand All @@ -150,12 +150,12 @@ format is the same as a canonical URL: [url]|[version] - e.g. https://loinc.org|2
Note that this is a generalization of the `check-system-version` parameter to the $expand operation to
apply to any canonical resource, including code systems.
"""
* parameter[=].type = #canonical
* parameter[=].type = #boolean

* parameter[+].name = #forceCanonicalVersion
* parameter[+].name = #forceArtifactlVersion
* parameter[=].use = #in
* parameter[=].min = 0
* parameter[=].max = "*"
* parameter[=].max = "1"
* parameter[=].documentation = """
Edge Case: Specifies a version to use for a canonical resource. This parameter overrides any
specified version in the artifact (and any artifacts it depends on). The
Expand All @@ -171,7 +171,7 @@ explicitly be represented in the expansion parameters.
Note that this is a generalization of the `force-system-version` parameter to the $expand operation
to apply to any canonical resource, including code systems.
"""
* parameter[=].type = #canonical
* parameter[=].type = #boolean

* parameter[+].name = #manifest
* parameter[=].use = #in
Expand Down
4 changes: 2 additions & 2 deletions input/fsh/operation-definitions/package-operation.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ InstanceOf: OperationDefinition
Title: "CRMI Package Operation"
Usage: #definition
* insert DefinitionMetadata
* insert CanonicalOperationProfile
* insert VersionBindableOperationProfile
* insert ArtifactOperationProfile
* insert ArtifactVersionBindableOperationProfile
* insert ManifestableOperationProfile
* name = "CRMIPackage"
* title = "CRMI Package"
Expand Down
8 changes: 6 additions & 2 deletions input/fsh/operation-profiles/_shared.fsh
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Alias: $fhir-types = http://hl7.org/fhir/resource-types

ValueSet: CanonicalResourceTypes
ValueSet: ArtifactResourceTypes
Description: "FHIR canonical plus knowledge artifact resource types."
Title: "Artifact Resource Types"
* ^experimental = false
* $fhir-types#ActivityDefinition
* $fhir-types#CapabilityStatement
* $fhir-types#ChargeItemDefinition
Expand Down Expand Up @@ -30,7 +33,8 @@ ValueSet: CanonicalResourceTypes
* $fhir-types#TerminologyCapabilities
* $fhir-types#TestScript
* $fhir-types#ValueSet
// also the "additional" canonical types

* $fhir-types#Group
* $fhir-types#Medication
* $fhir-types#Substance
* $fhir-types#MedicationKnowledge
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Profile: ArtifactEndpointConfigurableOperation
Id: crmi-artifact-endpoint-configurable-operation
Parent: OperationDefinition
Parent: OperationDefinition
Title: "CRMI Operation Profile: Artifact Endpoint Configurable"
Description: """
Profile for operations where artifact endpoint configuration can be specified.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
Profile: CanonicalOperation
Id: crmi-canonical-operation
Profile: ArtifactOperation
Id: crmi-artifact-operation
Parent: OperationDefinition
Title: "CRMI Operation Profile: Canonical Operation"
Title: "CRMI Operation Profile: Artifact Operation"
Description: """
Profile for general canonical artifact operations.
Profile for knowledge artifact operations.

This establishes input paramaters when the operation is involked at the resource
type level. The parameters are used to identify or specify the resource for the
operation.

* `url`: canonical URL of the resource
* `version`: version of the resource
* `url`: artifact URL* for the resource
* `version`: artifact version* for the resource
* `identifier`: business identifier for the resource
* `resource`: instance of a canonical resource

*The artifact URL for canonical resources is `.url`, for non-canonical resources, it is
the extension `artifact-url`. The version for canonical resources is `.version`, for non-canonical
resources it is the extension `artifact-version`.

NOTE: When involking canonical operations using any combination of `url`,
`version`, and `identifier`:
* if there is one-and-only-one matching resource, the operation should apply, otherwise an error state.
Expand Down Expand Up @@ -45,12 +49,13 @@ NOTE: When involking canonical operations using any combination of `url`,
* use = #in
* min = 0
* max = "1"
* type = #Identifier
* type = #string
* searchType = #token

* parameter contains resource 0..1 MS
* parameter[resource]
* name = #resource (exactly)
* use = #in
* min = 0
* max = "1"
* type from CanonicalResourceTypes (required)
* type from ArtifactResourceTypes (required)
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
Profile: ArtifactVersionBindableOperation
Id: crmi-artifact-version-bindable-operation
Parent: OperationDefinition
Title: "CRMI Operation Profile: Artifact Version Bindable"
Description: """
Operation where default artifact version(s) can be specified.

NOTE: Artifacts include FHIR Canonical resources and the resources specified as
non-canonical resources, such as: Medication, Substance, MedicationKnowledge,
and Group.

* `artifactVersion`: Specifies a version to use for a artifact resource if the artifact referencing the resource does not already specify a version. The format is the same as a canonical URL: `[url]|[version]` - e.g. `http://loinc.org|2.56`
* `checkArtifactVersion`: Edge Case: Specifies a version to use for a artifact resource. If the artifact referencing the resource specifies a different version, an error is returned instead of the package. The format is the same as a canonical URL: `[url]|[version]` - e.g. `http://loinc.org|2.56`
* `forceArtifactVersion`: Edge Case: Specifies a version to use for a artifact resource. This parameter overrides any specified version in the artifact (and any artifacts it depends on). The format is the same as a canonical URL: `[system]|[version]` - e.g. `http://loinc.org|2.56`. Note that this has obvious safety issues, in that it may result in a value set expansion giving a different list of codes that is both wrong and unsafe, and implementers should only use this capability reluctantly.
"""

* parameter
* insert SliceOnName

* parameter contains artifactVersion 0..* MS
* parameter[artifactVersion]
* name = #artifactVersion (exactly)
* min = 0
* max = "*"
* use = #in
* type = #uri

* parameter contains checkArtifactVersion 0..* MS
* parameter[checkArtifactVersion]
* name = #checkArtifactVersion (exactly)
* min = 0
* max = "1"
* use = #in
* type = #boolean

* parameter contains forceArtifactVersion 0..* MS
* parameter[forceArtifactVersion]
* name = #forceArtifactVersion (exactly)
* min = 0
* max = "1"
* use = #in
* type = #boolean
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
Profile: VersionableBindableOperation
Id: crmi-version-bindable-operation
Profile: CanonicalVersionBindableOperation
Id: crmi-canonical-version-bindable-operation
Parent: OperationDefinition
Title: "CRMI Operation Profile: Version Bindable"
Title: "CRMI Operation Profile: Canonical Version Bindable"
Description: """
Operation where default canonical version(s) can be specified

NOTE: This profile is here for backwards compatibility, see ArtifactVersionBindableOperation profile as a successor.

* `canonicalVersion`: Specifies a version to use for a canonical resource if the artifact referencing the resource does not already specify a version. The format is the same as a canonical URL: `[url]|[version]` - e.g. `http://loinc.org|2.56`
* `checkCanonicalVersion`: Edge Case: Specifies a version to use for a canonical resource. If the artifact referencing the resource specifies a different version, an error is returned instead of the package. The format is the same as a canonical URL: `[url]|[version]` - e.g. `http://loinc.org|2.56`
* `forceCanonicalVersion`: Edge Case: Specifies a version to use for a canonical resource. This parameter overrides any specified version in the artifact (and any artifacts it depends on). The format is the same as a canonical URL: `[system]|[version]` - e.g. `http://loinc.org|2.56`. Note that this has obvious safety issues, in that it may result in a value set expansion giving a different list of codes that is both wrong and unsafe, and implementers should only use this capability reluctantly.

"""

* parameter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ Operation where default manifest to resolve canonicals can be specified
* min = 0
* max = "1"
* use = #in
* type = #Library // ? Is this correct?
* type = #canonical
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
Profile: PageableOperation
Id: crmi-pagable-operation
Id: crmi-pageable-operation
Parent: OperationDefinition
Title: "CRMI Operation Profile: Pagable"
Title: "CRMI Operation Profile: Pageable"
Description: """
Operation that is pagable
Operation that is pageable

This establishes input parameters when the operation might return paging.

* `offset`: Pagination offset
* `count`: Number of items per page

"""

* parameter
Expand Down
8 changes: 6 additions & 2 deletions input/pages/capabilities.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ There are 5 workflows depicted using the swimlanes.

The CRMI IG is focused on the Setup workflow for knowledge artifacts, while subsequent workflows including Attribution/Selection, Submission, Evaluation are out of scope for this IG and covered by other implementation guides focused on particular use cases (such as the Data Exchange for Quality Measures IG for the quality measurement domain in the US Realm).

## Capability Statements
### Capability Statements

This implementation guide defines capability statements, use cases, and conformance requirements for:

Expand All @@ -29,7 +29,11 @@ In addition, the following example capability statement illustrates the use of t
* [**Example Library Evaluation Service**](CapabilityStatement-library-evaluation-service-example.html)


## Operations
### Operations

For profiles of knowledge operations to conventionalize API parameters and output, see [**CRMI Operation Profiles**](operations.html)

This implementation guide also defines the following operation definitions:

* [**$crmi.package**](OperationDefinition-crmi-package.html)
* [**$crmi.data-requirements**](OperationDefinition-crmi-data-requirements.html)
Expand Down
32 changes: 17 additions & 15 deletions input/pages/operations.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
{: #operations}

OperationDefinitions that involve canonical resources may conform to one or more
of the following profiles. This allows conventionalize operation paramater
of the following profiles. This allows conventionalize operation parameter
names, types, and processing semantics.

| **Operation Profile** | **Purpose** |
|-------------------------------------|-----------------------------------------------------------------------------|
| [Canonical][1] | Defines parameters used to identify canonical resource |
| [Version Bindable][2] | Defines parameters used to specify missing versions in canonical references |
| [Manifestable][3] | Defines parameters used to provide a version manifest |
| [Pagable][4] | Defines parameters for an operation with pagable options |
| [Artifact Endpoint Configurable][5] | Defines parameters to provide endpoints to resolve canonical artifacts |
| [Data Configurable][6] | Defines parameters to specify how to resolve data requirements |
| **Operation Profile** | **Purpose** |
|-------------------------------------|--------------------------------------------------------------------------------|
| [Artifact][1] | Defines parameters used to identify artifact resource |
| [Canonical Version Bindable][2] | DEPRECATED, see Artifact Version Bindable: Defines parameters used to specify missing versions in canonical references |
| [Artifact Version Bindable][3] | Defines parameters used to specify missing versions in all artifact references |
| [Manifestable][4] | Defines parameters used to provide a version manifest |
| [Pageable][5] | Defines parameters for an operation with pageable options |
| [Artifact Endpoint Configurable][6] | Defines parameters to provide endpoints to resolve canonical artifacts |
| [Data Configurable][7] | Defines parameters to specify how to resolve data requirements |

[1]: StructureDefinition-crmi-canonical-operation.html
[2]: StructureDefinition-crmi-version-bindable-operation.html
[3]: StructureDefinition-crmi-manifestable-operation.html
[4]: StructureDefinition-crmi-pagable-operation.html
[5]: StructureDefinition-crmi-artifact-endpoint-configurable-operation.html
[6]: StructureDefinition-crmi-data-configurable-operation.html
[1]: StructureDefinition-crmi-artifact-operation.html
[2]: StructureDefinition-crmi-canonical-version-bindable-operation.html
[3]: StructureDefinition-crmi-artifact-version-bindable-operation.html
[4]: StructureDefinition-crmi-manifestable-operation.html
[5]: StructureDefinition-crmi-pageable-operation.html
[6]: StructureDefinition-crmi-artifact-endpoint-configurable-operation.html
[7]: StructureDefinition-crmi-data-configurable-operation.html

<!--
* ArtifactOperation
Expand Down

0 comments on commit dd4d282

Please sign in to comment.