# text.div
plan

# rest[].resource[].searchParam[].documentation
Search the contents of the resource's data using a fulltext search

# rest[].resource[].searchParam[].documentation
Return resources linked to by the given target

# rest[].resource[].searchParam[].documentation
Only return resources which were last updated as specified by the given range

# rest[].resource[].searchParam[].documentation
Search for resources which have the given profile

# rest[].resource[].searchParam[].documentation
Search for resources which have the given security labels

# rest[].resource[].searchParam[].documentation
Search for resources which have the given source value (Resource.meta.source)

# rest[].resource[].searchParam[].documentation
Search for resources which have the given tag

# rest[].resource[].searchParam[].documentation
Search the contents of the resource's narrative using a fulltext search

# rest[].resource[].searchParam[].documentation
A use context assigned to the activity definition

# rest[].resource[].searchParam[].documentation
A quantity- or range-valued use context assigned to the activity definition

# rest[].resource[].searchParam[].documentation
A type of use context assigned to the activity definition

# rest[].resource[].searchParam[].documentation
A use context type and value assigned to the activity definition

# rest[].resource[].searchParam[].documentation
The activity definition publication date

# rest[].resource[].searchParam[].documentation
The description of the activity definition

# rest[].resource[].searchParam[].documentation
The time during which the activity definition is intended to be in use

# rest[].resource[].searchParam[].documentation
External identifier for the activity definition

# rest[].resource[].searchParam[].documentation
The intended audience of the plan definition

# rest[].resource[].searchParam[].documentation
Intended jurisdiction for the activity definition

# rest[].resource[].searchParam[].documentation
Reference to either Organization, CareTeam, Practitioner

# rest[].resource[].searchParam[].documentation
Role of Organization, CareTeam, Practitioner

# rest[].resource[].searchParam[].documentation
Computationally friendly name of the activity definition

# rest[].resource[].searchParam[].documentation
Name of the publisher of the activity definition

# rest[].resource[].searchParam[].documentation
The current status of the activity definition

# rest[].resource[].searchParam[].documentation
The human-friendly name of the activity definition

# rest[].resource[].searchParam[].documentation
The uri that identifies the activity definition

# rest[].resource[].searchParam[].documentation
The business version of the activity definition

# rest[].resource[].operation[].documentation
### Input
- resourceId: reference to the ActivityDefinition resource that should be cloned
- clone_operation: minor-version/major-version/copy Coding from codesystem: http://ehealth.sundhed.dk/cs/ehealth-clone-operation 
- default-clone-behavior: true/false. False signifies deep-clone mode where the list of deep-clone-references determine which resources should be cloned 
- deep-clone-references: References to resources to create as new resources rather than referencing the existing ones.

### Output
Bundle containing all resources that were created during the operation.

### Validation
- New business versions require that the user has modifier-role: owner or co-author for the resource
- New copy does not require that the user has a modifier-role.
- New business version can be made only when no draft resource exists (having identical base identifier).
- Read/search/create privileges are required for the resource types affected by $create-clone

# rest[].resource[].searchParam[].documentation
Search the contents of the resource's data using a fulltext search

# rest[].resource[].searchParam[].documentation
Search the contents of the resource's data using a filter

# rest[].resource[].searchParam[].documentation
Return resources linked to by the given target

# rest[].resource[].searchParam[].documentation
Only return resources which were last updated as specified by the given range

# rest[].resource[].searchParam[].documentation
Search for resources which have the given profile

# rest[].resource[].searchParam[].documentation
Search for resources which have the given security labels

# rest[].resource[].searchParam[].documentation
Search for resources which have the given source value (Resource.meta.source)

# rest[].resource[].searchParam[].documentation
Search for resources which have the given tag

# rest[].resource[].searchParam[].documentation
Search the contents of the resource's narrative using a fulltext search

# rest[].resource[].searchParam[].documentation
Mime type of the content, with charset etc.

# rest[].resource[].searchParam[].documentation
Organization which maintains the document

# rest[].resource[].searchParam[].documentation
When this document reference was created

# rest[].resource[].searchParam[].documentation
The Organization which is intended to use the DocumentReference

# rest[].resource[].searchParam[].documentation
Role of Organization related to modification of the DocumentReference

# rest[].resource[].searchParam[].documentation
Time of service that is being documented

# rest[].resource[].searchParam[].documentation
Additional details about where the content was created (e.g. clinical specialty)

# rest[].resource[].searchParam[].documentation
A use context assigned to the DocumentReference

# rest[].resource[].searchParam[].documentation
A type of use context assigned to the DocumentReference

# rest[].resource[].searchParam[].documentation
A use context type and value assigned to the DocumentReference

# rest[].resource[].searchParam[].documentation
Search the contents of the resource's data using a fulltext search

# rest[].resource[].searchParam[].documentation
Return resources linked to by the given target

# rest[].resource[].searchParam[].documentation
Only return resources which were last updated as specified by the given range

# rest[].resource[].searchParam[].documentation
Search for resources which have the given profile

# rest[].resource[].searchParam[].documentation
Search for resources which have the given security labels

# rest[].resource[].searchParam[].documentation
Search for resources which have the given source value (Resource.meta.source)

# rest[].resource[].searchParam[].documentation
Search for resources which have the given tag

# rest[].resource[].searchParam[].documentation
Search the contents of the resource's narrative using a fulltext search

# rest[].resource[].searchParam[].documentation
A use context assigned to the plan definition

# rest[].resource[].searchParam[].documentation
A quantity- or range-valued use context assigned to the plan definition

# rest[].resource[].searchParam[].documentation
A type of use context assigned to the plan definition

# rest[].resource[].searchParam[].documentation
A use context type and value assigned to the plan definition

# rest[].resource[].searchParam[].documentation
Activity or plan definitions used by plan definition

# rest[].resource[].searchParam[].documentation
The time during which the plan definition is intended to be in use

# rest[].resource[].searchParam[].documentation
External identifier for the plan definition

# rest[].resource[].searchParam[].documentation
The intended audience of the plan definition

# rest[].resource[].searchParam[].documentation
Intended jurisdiction for the plan definition

# rest[].resource[].searchParam[].documentation
Reference to either Organization, CareTeam, Practitioner

# rest[].resource[].searchParam[].documentation
Role of Organization, CareTeam, Practitioner

# rest[].resource[].searchParam[].documentation
Computationally friendly name of the plan definition

# rest[].resource[].searchParam[].documentation
Name of the publisher of the plan definition

# rest[].resource[].searchParam[].documentation
The current status of the plan definition

# rest[].resource[].searchParam[].documentation
The human-friendly name of the plan definition

# rest[].resource[].searchParam[].documentation
The type of artifact the plan (e.g. order-set, eca-rule, protocol)

# rest[].resource[].searchParam[].documentation
The uri that identifies the plan definition

# rest[].resource[].searchParam[].documentation
The business version of the plan definition

# rest[].resource[].operation[].documentation
Import a Plandefinition
### Parameters
- planDefinitionPackage: Binary package produced by the export operation
### Output
Bundle containing the created resources. PlanDefinitions, ActivityDefinitions, and Questionnaires will be created. Imports QFFD DocumentReference into Document-Transformation service.Libraries and Organizations are used to find the corresponding resources on the target system.

# rest[].resource[].operation[].documentation
Export a PlanDefinition.
### Export Contents
The export contains the PlanDefinition including referenced resources:- PlanDefinitions
- ActivityDefinitions
- Questionnaires
- Libraries
- Organizations
- DocumentReference + QFDD

Each resource is returned in a separate JSon file.
### Parameters
- exclude: references to ActivityDefinitions or PlanDefinitions to exclude from the export.
### Output
Output can be found in Binary.content. This is a Base64 encoded .zip file containing JSon files.
All returned objects are Fhir resources. See the implementation guide for details

# rest[].resource[].operation[].documentation
### Input
- resourceId: reference to the PlanDefinition resource that should be cloned
- clone_operation: minor-version/major-version/copy Coding from codesystem: http://ehealth.sundhed.dk/cs/ehealth-clone-operation 
- default-clone-behavior: true/false. False signifies deep-clone mode where the list of deep-clone-references determine which resources should be cloned 
- deep-clone-references: References to resources to create as new resources rather than referencing the existing ones.

### Output
Bundle containing all resources that were created during the operation.

### Validation
- New business versions require that the user has modifier-role: owner or co-author for the resource
- New copy does not require that the user has a modifier-role.
- New business version can be made only when no draft resource exists (having identical base identifier).
- Read/search/create privileges are required for the resource types affected by $create-clone

# rest[].resource[].operation[].documentation
Create a careplan with service requests for a specific episodeOfCare using the PlanDefinition as a template.
### HTTP Methods
- If using POST the operation will persist resources and return the careplan.
- If using GET the operation will return transient resources in a transaction bundle. The bundle with transient careplan and servicerequest resources can then be modified before being persisted using a FHIR transaction.
### Parameters
- episodeOfCare: Reference(EpisodeOfCare) - The episode of care for which the plan is being applied.
### Output
CarePlan or Bundle of transient CarePlan and ServiceRequest resources.

# rest[].operation[].documentation
Operation for polling the status of a previously initiated FHIR Bulk Data System Level Export. A complete URL including the '_jobId' is returned in the 'Content-Location' response header when initiating the export. A 'GET' request to the polling location will return '202 Accepted' with a response header 'X-Progress' containing a status message for the progress of the export job. When the job has finished, the polling location will return '200 OK', and the contents of the body will be a JSON object providing metadata and links to the generated bulk data files. A 'DELETE' request can be used to cancel the export. If the export has already finished, the delete will return '404 Not Found', else the export job will be cancelled and a '202 Accepted' is returned with an operation outcome response.
### Parameters
- _jobId: the job ID for the Bulk Export job which was returned in the 'Content-Location' header when initiating the export

# rest[].operation[].documentation
FHIR Operation to initiate an export of data from a FHIR server. The type of resources returned can be restricted using the '_type' parameter, and the '_since' parameter can be used to restrict resources to be only included if changed since the supplied time. The FHIR server support invocation of this operation using the [FHIR Asynchronous Request Pattern](http://hl7.org/fhir/R4/async.html).
## Initiation of export
The initiation of an export must specify the request header 'Prefer: respond-async', and will return '202 Accepted' with a polling location in the response header 'Content-Location'. The polling location is for the endpoint '$export-poll-status' and has the export job ID as parameter '_jobId'.
### Parameters
- _outputFormat: Optional parameter to specify the output format of the exported files. Default is 'application/fhir+ndjson'
- _type: Optional parameter to specify a comma separated list of resource types to be included in the export. If not provided, all resource types will be included.
- _since: Optional parameter to specify a time. Only resources that have been created or modified after this time will be included in the export (i.e., if Resource.meta.lastUpdated is later than the supplied _since time).
- _until: Optional parameter to specify a time. Only resources that have been created or modified before this time will be included in the export (i.e., if Resource.meta.lastUpdated is earlier than the supplied _until time).
- _typeFilter: Optional parameter to apply search filter of resources for export. It is a string of comma-delimited FHIR REST search queries in the format [resourceType]?[parameters]. The filter will be applied when searching resources.
- _typePostFetchFilterUrl: Optional parameter to apply filtering of resources for export. It is a string of comma-delimited FHIR REST search queries in the format [resourceType]?[parameters]. The filter will be applied on resources after being fetched from the database.
- _includeHistory: Optional parameter to specify whether historical versions of resources should be included in the export. Default is false.
- _exportId: Optional parameter to specify a client provided identifier for the export. Resulting exported files (Binary) will be labeled with the identifer in meta extension 'https://hapifhir.org/NamingSystem/bulk-export-identifier'
## Polling status of export
Subsequent GET requests to the polling location will return '202 Accepted' with a response header 'X-Progress' containing a status message for the progress of the export job. When the job has finished, the polling location will return '200 OK', and the contents of the body will be a JSON object providing metadata and links to the generated bulk export data files.
## Retrieving exported files
The JSON object returned when the export job is complete will contain a list of files (Binary resources) available for download. Each file can be retrieved using a standard HTTP GET request to the provided URL. The security context of the Binary resources resulting from the export is the user that initiated the export. The files can therefore only be retrieved by the same user.
### Retention of exported files
The exported files are retained for a limited time after which they are deleted. The retention time is a server configuration with default 2 hours.

# rest[].operation[].documentation
Provides the number of resources currently stored on the server, broken down by resource type