---
{
  "title": "So laden Sie StructureDefinition über die FHIR API in Aidbox hoch",
  "description": "StructureDefinition ist eine Ressource, die die Struktur anderer Ressourcen beschreibt, einschließlich Profile, Extensions und Datentypen.",
  "date": "2025-04-18",
  "author": "Ivan Bagrov",
  "reading-time": "3 min",
  "tags": [
    "FHIR Profiling",
    "Aidbox"
  ]
}
---
StructureDefinition ist eine Ressource, die die Struktur anderer Ressourcen beschreibt, einschließlich Profile, Extensions und Datentypen.

Aidbox ermöglicht es Ihnen, StructureDefinition-Ressourcen zur Laufzeit über die FHIR API zu erstellen. Dadurch können Sie Profile für Standardressourcen definieren, Extensions anlegen und benutzerdefinierte Ressourcen entwerfen.

## Beispiel eines Request-Body zum Erstellen eines Profils via StructureDefinition

In diesem Beispiel wird ein Profil für die Patient-Ressource erstellt, bei dem das Feld „name" als Pflichtfeld markiert ist. Dies erfolgt über eine REST-Anfrage an den FHIR-Endpunkt für StructureDefinition, wobei die Profildefinition im Body der Anfrage enthalten ist.


```javascript
POST /fhir/StructureDefinition
content-type: application/json
accept: application/json

{
	"derivation": "constraint",
	"name": "my-patient-profile",
	"abstract": false,
	"type": "Patient",
	"status": "active",
	"kind": "resource",
	"url": "http://example.org/StructureDefinition/my-patient-profile",
	"baseDefinition": "http://hl7.org/fhir/StructureDefinition/Patient",
	"differential": {
    	"element": [
        	{
            	"id": "Patient.name",
            	"path": "Patient.name",
            	"min": 1
        	}
    	]
	}
}
```


## Beispiel eines Request-Body zum Erstellen einer Extension via StructureDefinition

Es wird eine Extension mit dem Namen „insurance-plan" erstellt, um die Referenzierung eines zugehörigen Versicherungsplans (die InsurancePlan-Ressource) zu ermöglichen.


```javascript
POST /fhir/StructureDefinition

{
  "abstract": false,
  "url": "http://my.company/StructureDefinition/insurance-plan",
  "id": "insurance-plan",
  "name": "InsurancePlanReference",
  "status": "active",
  "kind": "complex-type",
  "type": "Extension",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Extension",
  "version": "0.0.1",
  "differential": {
	"element": [
  	{
    	"id": "Extension",
    	"max": "1",
    	"min": 0,
    	"path": "Extension",
    	"short": "Reference to the insurance plan"
  	},
  	{
    	"id": "Extension.url",
    	"max": "1",
    	"min": 1,
    	"path": "Extension.url",
    	"fixedUri": "http://my.company/StructureDefinition/insurance-plan"
  	},
  	{
    	"id": "Extension.value[x]",
    	"max": "1",
    	"min": 1,
    	"path": "Extension.value[x]",
    	"type": [
      	{
        	"code": "Reference",
        	"targetProfile": [
          	"http://hl7.org/fhir/StructureDefinition/InsurancePlan"
        	]
      	}
    	]
  	}
	]
  },
  "resourceType": "StructureDefinition",
  "derivation": "constraint"
}
```


## Beispiel eines Request-Body zum Erstellen einer benutzerdefinierten Ressource via StructureDefinition

In diesem Beispiel wird eine benutzerdefinierte Ressource mit dem Namen „TutorNotificationTemplate" erstellt, die ein einziges Pflichtfeld „template" vom Typ „string" enthält.


```javascript
POST /fhir/StructureDefinition
content-type: application/json
accept: application/json

{
	"derivation": "specialization",
	"name": "TutorNotificationTemplate",
	"abstract": false,
	"type": "TutorNotificationTemplate",
	"status": "active",
	"kind": "resource",
	"url": "http://example.org/StructureDefinition/TutorNotificationTemplate",
	"baseDefinition": "http://hl7.org/fhir/StructureDefinition/DomainResource",
	"differential": {
    	"element": [
        	{
            	"id": "TutorNotificationTemplate",
            	"path": "TutorNotificationTemplate",
            	"min": 0,
            	"max": "*"
        	},
        	{
            	"id": "TutorNotificationTemplate.template",
            	"path": "TutorNotificationTemplate.template",
            	"min": 1,
            	"max": "1",
            	"type": [
                	{
                    	"code": "string"
                	}
            	]
        	}
    	]
	}
}
```


Sie können diese Beispiele als Ausgangspunkt für die Erstellung Ihrer eigenen Profile, Extensions und benutzerdefinierten Ressourcen im [Aidbox FHIR Server](https://www.health-samurai.io/fhir-server) verwenden. Für weiterführende Szenarien lesen Sie bitte die offizielle Aidbox- und FHIR-[Dokumentation](https://www.health-samurai.io/docs/aidbox/).

Siehe auch: [Simplifier](/blog/simplifier) und [4 Möglichkeiten, IGs in Aidbox hochzuladen](/blog/4-ways-to-upload-igs-to-aidbox-pros-and-cons).