Publish-box (todo)
Orders and Observations Work Group | Maturity Level: 3 | Trial Use | Compartments: N/A |
A client can ask a server to generate a document reference from a document. The server reads the existing document and generates a matching DocumentReference resource, or returns one it has previously generated. Servers may be able to return or generate document references for the following types of content:.
The canonical URL for this operation definition is
http://hl7.org/fhir/OperationDefinition/DocumentReference-generate
Formal Definition (as a OperationDefinition).
URL: [base]/DocumentReference/$generate
This is not an idempotent operation
In Parameters: | ||||||
Name | Scope | Cardinality | Type | Binding | Profile | Documentation |
url | 1..1 | uri | The URL to the source document. This may be a general URL or a Binary or a Composition or a Bundle. | |||
persist | 0..1 | boolean | Whether to store the document at the document end-point (/Document) or not, once it is generated (default is for the server to decide). | |||
Out Parameters: | ||||||
Name | Scope | Cardinality | Type | Binding | Profile | Documentation |
return | 1..1 | Bundle | The bundle type is "searchset"containing DocumentReference resource and may include a Binary. If the input url refers to another server, it is at the discretion of the server whether to retrieve it or return an error. Note: as this is the only out parameter, it is a resource, and it has the name 'return', the result of this operation is returned directly as a resource |
The server either returns a search result containing a single document reference, or it returns an error. If the URI refers to another server, it is at the discretion of the server whether to retrieve it or return an error.
Request: Example of $generate on a Document
POST /open/DocumentReference/$generate [some headers] { "resourceType": "Parameters", "id": "example", "parameter": [ { "name": "url", "valueUrl": "Binary/example" }, { "name": "persist", "valueBoolean": "true" } ] }
Response: Results from $generate
HTTP/1.1 200 OK [other headers] { "resourceType": "Bundle", "id": "26419249-18b3-45de-b10e-dca0b2e72a", "meta": { "lastUpdated": "2016-03-18T03:28:49Z" }, "type": "searchset", "total": 1, "entry": [{ "fullUrl": "http://server/path/DocumentReference/example", "resource": { "resourceType": "DocumentReference", "id": "example", .. snip ... } }] }
For more information about operations, including how they are invoked, see Operations.