Conversation
galemsky-hs
left a comment
There was a problem hiding this comment.
Very rough so far
galemsky-hs
left a comment
There was a problem hiding this comment.
It's much better already! But it raises several design questions we need to address
|
|
||
| The `$add-mappings` operation adds one or more mappings to a ConceptMap resource without returning the full resource content. | ||
|
|
||
| The [$add](https://hl7.org/fhir/R5/resource-operation-add.html) operation supports only Group and List resources and returns the modified resource. For large ConceptMap resources, returning the full content is not practical. |
There was a problem hiding this comment.
I think this should be moved to the "rationale" section that will not be part of the spec, since it's not really a part of it and I believe it won't be present on the hl7.org page of the operation.
|
|
||
| The operation is atomic: if any mapping causes an error, no mappings are added. | ||
|
|
||
| All ConceptMap elements outside of `group` are ignored. |
There was a problem hiding this comment.
I think we can make the language closer to the $add spec:
The server SHALL ignore all elements except for the relevant array (e.g., Group.member or List.entry).
|
|
||
| - If a mapping does not exist, it is added. | ||
| - If a mapping exists with identical values for all fields, no action is taken. | ||
| - If a mapping exists with different values (e.g., different `relationship`, `display`, or `comment`), the server SHALL return an error. |
There was a problem hiding this comment.
Hmmmmm... So if there's a collision, it will require a manual intervention, since we don't have $remove-mapping or $insert-mapping operations. It's worth to discuss it
There was a problem hiding this comment.
It looks like the standard approach for adding multiple elements is making a Bundle which already has the property: type = transaction/batch. It will solve the problem, but will make the solution less elegant. Need to discuss as well
There was a problem hiding this comment.
Add specs:
- the current one
add-mappingthat behaves like merge ("This instance-level operation merges array entries into an existing ("target") resource, based on values from a supplied ("input") resource, ignoring any values that are already present in the target. ")merge-mappingthat behaves like merge
|
|
||
| The [$add](https://hl7.org/fhir/R5/resource-operation-add.html) operation supports only Group and List resources and returns the modified resource. For large ConceptMap resources, returning the full content is not practical. | ||
|
|
||
| The server SHALL add mappings from the input `group` elements. Two mappings are considered the same if they share the same `group.source`, `group.target`, `element.code`, and `target.code`. |
There was a problem hiding this comment.
"SHALL add all mappings" I think
| @@ -0,0 +1,96 @@ | |||
| # Operation $add-mappings on ConceptMap | |||
|
|
|||
| The `$add-mappings` operation adds one or more mappings to a ConceptMap resource without returning the full resource content. | |||
There was a problem hiding this comment.
Looks like it's better to keep singular name ($add-mapping) even though it can insert many. Looks more aligned with fhir IMO
| - If a mapping exists with different values (e.g., different `relationship`, `display`, or `comment`), the server SHALL return an error. | ||
| - If a `group` with the specified `source` and `target` does not exist, it is created. | ||
|
|
||
| The operation is atomic: if any mapping causes an error, no mappings are added. |
There was a problem hiding this comment.
Hm, need to check if it aligns with fhir standards
|
|
||
| All ConceptMap elements outside of `group` are ignored. | ||
|
|
||
| URL: [base]/ConceptMap/[id]/$add-mappings |
There was a problem hiding this comment.
Should be moved to the top
|
|
||
| URL: [base]/ConceptMap/[id]/$add-mappings | ||
|
|
||
| This is an idempotent operation. |
There was a problem hiding this comment.
Can merge atomic property and this claim into 1 line
dba6eb5 to
d8b1735
Compare
- Simplify $add-mapping to merge semantics - Rename $add-mappings to $add-mapping - Ignore duplicates instead of returning conflict - Remove atomicity requirement
- Add OperationDefinition JSON targeting FHIR R6
- Move rationale (why not $add) to separate section
- Use FHIR conformance language ("SHALL ignore")
- Reorder sections to match FHIR spec structure
- Mark as not idempotent
- Restructure document to contain both $add-mapping and $remove-mapping - Add shared introduction and rationale section - Add complete $remove-mapping operation with parameters, examples, and formal OperationDefinition - Move rationale to document top, demote Examples/Formal Definition to subsections - Align with FHIR style conventions
mapping match criteria
$remove-mapping drafts
7828a23 to
b7fd53f
Compare
33aca9a to
d1d0f41
Compare
No description provided.