Extension (Patient Profile)

{
    "resourceType": "StructureDefinition",
    "id": "patient-extension",
    "url": "http://example.org/fhir/StructureDefinition/patient-extension",
    "name": "Patientextension",
    "title": "Patient (extension)",
    "status": "draft",
    "experimental": true,
    "description": "This profile illustrates the use of extensions within a given FHIR resource, as seen with the patient profile here.",
    "fhirVersion": "4.0.1",
    "kind": "resource",
    "abstract": false,
    "type": "Patient",
    "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Patient",
    "derivation": "constraint",
    "differential": {
        "element":  [
            {
                "id": "Patient.gender",
                "path": "Patient.gender",
                "short": "male | female | other | unknown",
                "min": 1,
                "max": "1",
                "base": {
                    "path": "Patient.gender",
                    "min": 0,
                    "max": "1"
                },
                "type":  [
                    {
                        "code": "code"
                    }
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() or (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div",
                        "source": "http://hl7.org/fhir/StructureDefinition/Element"
                    }
                ],
                "mustSupport": true,
                "isModifier": false,
                "isSummary": true,
                "binding": {
                    "extension":  [
                        {
                            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                            "valueString": "AdministrativeGender"
                        },
                        {
                            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
                            "valueBoolean": true
                        }
                    ],
                    "strength": "required",
                    "description": "The gender of a person used for administrative purposes.",
                    "valueSet": "http://hl7.org/fhir/ValueSet/administrative-gender|4.0.1"
                },
                "mapping":  [
                    {
                        "identity": "v2",
                        "map": "PID-8"
                    },
                    {
                        "identity": "rim",
                        "map": "player[classCode=PSN|ANM and determinerCode=INSTANCE]/administrativeGender"
                    },
                    {
                        "identity": "cda",
                        "map": ".patient.administrativeGenderCode"
                    }
                ]
            }
        ]
    }
}