Medication

POST Create a medication

POST /Medication

Creates a resource using the create interaction from the FHIR resources.

Parameters

  • X-CORRELATION-ID (header, string)
  • Accept (header, string)
    Allowed values: application/fhir+json.

Request body

Media type: application/fhir+json. Schema: Medication.

Example

{
    "resourceType": "Medication",
    "identifier": [
        {
            "use": "usual",
            "system": "urn:custom:sourcesystem:fhirid",
            "value": "medi2345"
        },
        {
            "value": "12345",
            "system": "http://medication.identifier",
            "type": {
                "coding": [
                    {
                        "system": "http://identifier11b",
                        "version": "1.0",
                        "code": "identifier11b",
                        "display": "medication identifier codeset 1"
                    },
                    {
                        "system": "http://medication.identifier11b",
                        "version": "1.0",
                        "code": "identifier11b",
                        "display": "medication identifier 2"
                    }
                ],
                "text": "Identifier Bundle"
            }
        }
    ],
    "meta": {
        "profile": [
            "http://hl7.org/fhir/us/core/StructureDefinition/us-core-medication"
        ]
    },
    "code": {
        "coding": [
            {
                "system": "http://snomed.info/sct",
                "version": "1.0",
                "code": "3852192344",
                "display": "Injection solution (qualifier value)"
            },
            {
                "system": "http://www.nlm.nih.gov/research/umls/rxnorm1",
                "version": "1.0",
                "code": "10734335",
                "display": "Triamcinolone Oral Paste"
            }
        ],
        "text": "Medication Code 2345"
    },
    "status": "active",
    "manufacturer": {
        "reference": "Organization/001B000001Pjme9IAB"
    },
    "form": {
        "coding": [
            {
                "system": "http://snomed.info/sct",
                "code": "3852191334",
                "display": "Injection solution (qualifier value)"
            }
        ],
        "text": "Medication Form 2345"
    },
    "amount": {
        "numerator": {
            "value": 50.0,
            "unit": "inch"
        },
        "denominator": {
            "value": 12.0,
            "unit": "inch"
        }
    }
}

Responses

  • 201 No match was found. Resource created.

    Headers:

    • Location (string, required) Specifies the URL where the resource can be fetched in subsequent requests.
      Example: http://xxx/Medication/123.

    Media type: application/fhir+json. Schema: Medication (extended).

    Includes all fields of Medication.

    • id (string, required) Specifies the Salesforce ID of the created object.
      Pattern: ^[A-Za-z0-9\-\.]{1,64}$.

    Example

    {
        "resourceType": "Medication",
        "id": "0itB0000000PDqrIAG",
        "identifier": [
            {
                "use": "usual",
                "value": "medi2345",
                "system": "urn:custom:sourcesystem:fhirid"
            },
            {
                "value": "12345",
                "system": "http://medication.identifier",
                "type": {
                    "coding": [
                        {
                            "system": "http://identifier11b",
                            "version": "1.0",
                            "code": "identifier11b",
                            "display": "medication identifier codeset 1"
                        },
                        {
                            "system": "http://medication.identifier11b",
                            "version": "1.0",
                            "code": "identifier11b",
                            "display": "medication identifier 2"
                        }
                    ],
                    "text": "Identifier Bundle1"
                }
            }
        ],
        "meta": {
            "profile": [
                "http://hl7.org/fhir/us/core/StructureDefinition/us-core-medication"
            ]
        },
        "code": {
            "coding": [
                {
                    "system": "http://snomed.info/sct",
                    "version": "1.0",
                    "code": "3852192344",
                    "display": "Injection solution (qualifier value)"
                },
                {
                    "system": "http://www.nlm.nih.gov/research/umls/rxnorm1",
                    "version": "1.0",
                    "code": "10734335",
                    "display": "Triamcinolone Oral Paste"
                }
            ],
            "text": "Medication Code 2345"
        },
        "status": "active",
        "manufacturer": {
            "reference": "Organization/001B000001Pjme9IAB"
        },
        "form": {
            "coding": [
                {
                    "system": "http://snomed.info/sct",
                    "code": "3852191334",
                    "display": "Injection solution (qualifier value)"
                }
            ],
            "text": "Medication Form 2345"
        },
        "amount": {
            "numerator": {
                "value": 50.0,
                "unit": "inch"
            },
            "denominator": {
                "value": 12.0,
                "unit": "inch"
            }
        }
    }
  • 400 Resource either can’t be parsed or failed basic FHIR validation rules.

    Media type: application/fhir+json. Schema: OperationOutcome.

    Example

    {
      "resourceType": "OperationOutcome",
      "id": "validationfail",
      "issue": [
        {
          "severity": "fatal",
          "code": "invalid",
          "details": {
            "text": "Error parsing resource JSON (Unknown Content \"label\""
          }
        }
      ]
    }
  • 404 Resource type not supported.

    Media type: application/fhir+json. Schema: OperationOutcome.

    Example: same as POST /Medication 400 response.

  • 405 Server denied the request.

    Media type: application/fhir+json. Schema: OperationOutcome.

    Example: same as POST /Medication 400 response.

  • 422 The proposed resource violated applicable FHIR profiles or server business rules.

    Media type: application/fhir+json. Schema: OperationOutcome.

    Example: same as POST /Medication 400 response.

  • 503 Error connecting Salesforce.

    Media type: application/fhir+json. Schema: OperationOutcome.

    Example: same as POST /Medication 400 response.