Skip to content

Commit 052825b

Browse files
committed
#262: Moved action examples out of table and added json examples of each type.
1 parent 5ea158f commit 052825b

File tree

1 file changed

+39
-1
lines changed

1 file changed

+39
-1
lines changed

docs/specification/1.0.md

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,45 @@ Field | Optionality | Type | Description
409409
----- | ----- | ----- | --------
410410
`type` | REQUIRED | *string* | The type of action being performed. Allowed values are: `create`, `update`, `delete`.
411411
`description` | REQUIRED | *string* | Human-readable description of the suggested action MAY be presented to the end-user.
412-
`resource` | OPTIONAL | *object* | Depending upon the `type` attribute, a new resource or the id of a resource. When the `type` attribute is `create`, the `resource` attribute contains a new FHIR resource to be created (e.g. for `medication-prescribe`, this holds the updated prescription as proposed by the suggestion). For `delete`, this is the id of any resource to remove (e.g. for the `order-review` hook, this would provide a way to remove an order from the pending list). In hooks like `medication-prescribe` where only one "content" resource is ever relevant, this field MAY be omitted for deletes only. For `update`, this holds the updated resource (e.g. for the `order-review` hook, this would provide a way to annotate an order from the pending list with an assessment).
412+
`resource` | OPTIONAL | *object* | Depending upon the `type` attribute, a new resource or the id of a resource. When the `type` attribute is `create`, the `resource` attribute contains a new FHIR resource to be created. For `delete`, this is the id of the resource to remove. In hooks where only one "content" resource is ever relevant, this attribute MAY be omitted for deletes only. For `update`, this holds the updated resource.
413+
414+
The following example illustrates a create action:
415+
416+
```json
417+
{
418+
"type": "create",
419+
"description": "Create a prescription for Acetaminophen 250 MG",
420+
"resource": {
421+
"resourceType": "MedicationRequest",
422+
"id": "medrx001",
423+
"...": "<snipped for brevity>"
424+
}
425+
}
426+
```
427+
428+
The following example illustrates an update action:
429+
430+
```json
431+
{
432+
"type": "update",
433+
"description": "Update the order to record the appropriateness score",
434+
"resource": {
435+
"resourceType": "ProcedureRequest",
436+
"id": "procedure-request-1",
437+
"...": "<snipped for brevity"
438+
}
439+
}
440+
```
441+
442+
The following example illustrates a delete action:
443+
444+
```json
445+
{
446+
"type": "delete",
447+
"description": "Remove the inappropriate order",
448+
"resource": "ProcedureRequest/procedure-request-1"
449+
}
450+
```
413451

414452
#### Link
415453

0 commit comments

Comments
 (0)