Upload a template

Upload a new ADL 1.4 operational template (OPT).

Headers
  • Prefer
    Type: stringenum

    Request header to indicate the preference over response details. The response will contain the entire resource when the Prefer header has a value of return=representation.

    values
    • return=representation
    • return=minimal
Body
required
application/xml
  • Empty object
Responses
  • application/xml
  • 400

    400 Bad Request is returned when unable to upload a template, because of invalid content.

  • 409

    409 Conflict is returned when a template with same template_id (at given version, if supplied) already exists.

Request Example for post/definition/template/adl1.4
curl https://cataniamc.prod.cadasto.com/v1/definition/template/adl1.4 \
  --request POST \
  --header 'Prefer: return=minimal' \
  --header 'Content-Type: application/xml' \
  --data '<template xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.openehr.org/v1">
    <language>
        <terminology_id>
            <value>ISO_639-1</value>
        </terminology_id>
        <code_string>en</code_string>
    </language>
    <description>
        <original_author id="Original Author">Not Specified</original_author>
        <lifecycle_state>Initial</lifecycle_state>
        <other_details id="MetaDataSet:Sample Set ">Template metadata sample set</other_details>
        <other_details id="Acknowledgements"></other_details>
        <other_details id="Business Process Level"></other_details>
        <other_details id="Care setting"></other_details>
        <other_details id="Client group"></other_details>
        <other_details id="Clinical Record Element"></other_details>
        <other_details id="Copyright"></other_details>
        <other_details id="Issues"></other_details>
        <other_details id="Owner"></other_details>
        <other_details id="Sign off"></other_details>
        <other_details id="Speciality"></other_details>
        <other_details id="User roles"></other_details>
        <details>
            <language>
                <terminology_id>
                    <value>ISO_639-1</value>
                </terminology_id>
                <code_string>en</code_string>
            </language>
            <purpose>Not Specified</purpose>
        </details>
    </description>
    <uid>
        <value>b4d7f203-b329-4e89-a58a-c605b19e94de</value>
    </uid>
    <template_id>
        <value>Vital Signs</value>
    </template_id>
    <concept>Vital Signs</concept>
    <definition>
        <rm_type_name>COMPOSITION</rm_type_name>
        <occurrences>
            <lower_included>true</lower_included>
            <upper_included>true</upper_included>
            <lower_unbounded>false</lower_unbounded>
            <upper_unbounded>false</upper_unbounded>
            <lower>1</lower>
            <upper>1</upper>
        </occurrences>
        <node_id>at0000</node_id>
        ...'
{}