Skip to content

Operation $snapshot

Operation $snapshot allows to generate snapshot to a StructureDefinition differential.

Endpoints

URL: [base]/StructureDefinition/$snapshot

Query parameters

In Parameters:
Name Cardinality Type Binding Profile Documentation
definition 0..1 StructureDefinition The StructureDefinition is provided directly as part of the request.
Out Parameters:
Name Cardinality Type Binding Profile Documentation
return 1..1 StructureDefinition The structure definition with a snapshot

Example

Example - Request

POST 'https://demo.kodjin.com/fhir/StructureDefinition/$snapshot
body
{
    "resourceType": "StructureDefinition",
    "id": "some-extension",
    "url": "http://example.com/StructureDefinition/some-extension",
    "version": "1.0.0",
    "name": "some-extension",
    "title": "some-extension",
    "status": "draft",
    "description": "Extension: some-extension",
    "fhirVersion": "4.0.1",
    "kind": "complex-type",
    "abstract": false,
    "context": [
        {
            "type": "element",
            "expression": "canonical"
        }
    ],
    "type": "Extension",
    "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Extension",
    "derivation": "constraint",
    "differential": {
        "element": [
            {
                "id": "Extension",
                "path": "Extension",
                "short": "Reaction Duration",
                "definition": "Extension: Reaction Duration"
            },
            {
                "id": "Extension.extension",
                "path": "Extension.extension",
                "max": "0"
            },
            {
                "id": "Extension.url",
                "path": "Extension.url",
                "fixedUri": "http://fhir.health.gov.il/StructureDefinition/ext-reaction-duration"
            },
            {
                "id": "Extension.value[x]",
                "path": "Extension.value[x]",
                "slicing": {
                    "discriminator": [
                        {
                            "type": "type",
                            "path": "$this"
                        }
                    ],
                    "ordered": false,
                    "rules": "open"
                },
                "type": [
                    {
                        "code": "Duration"
                    }
                ]
            },
            {
                "id": "Extension.valueDuration",
                "path": "Extension.valueDuration",
                "min": 0,
                "max": "1",
                "example": [
                    {
                        "valueDuration": {
                            "value": 3,
                            "code": "a",
                            "system": "http://unitsofmeasure.org"
                        },
                        "label": "Valid Example"
                    }
                ]
            }
        ]
    }
}

Try operation $snapshot with our Kodjin FHIR Server Postman Collection