---
schema_version: "1"
id: ff4306da3c63236f71ffe727b832442f1dd84d1e8f1aeb8149f45fe0aee3e695
title: Care Management
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/industries-integrations/health/references/generated-api-specs/care_management.md
canonical_url: https://developer.salesforce.com/docs/industries/health/references/care_management
source_site: developer.salesforce.com
content_type: documentation
content_hash: b54618ae9f1668694c4973e64c2f2fd1f3f5a69ac13342b8a5252292a0efb391
products:
  - Salesforce Healthcare API
  - Industries Integrations
---
Care Management

# Care Management

Use the FHIR R4 Care Management API to manage the CarePlan and Goal resources.

**Version:** v1

Protocols: https.

## Operations

### GET Retrieve care plan records

`GET /CarePlan`

Retrieves a set of resources by using filters.

#### Parameters

*   `category` (query, string, required) Specifies the type of the care plan.
*   `patient` (query, string, required) Specifies the patient for whom the care plan is for.
*   `X-CORRELATION-ID` (header, string)
*   `Accept` (header, string)  
    Allowed values: `*/*`, `application/fhir+json`.

#### Responses

*   **200**
    
    Media type: `application/fhir+json`. Schema: `CarePlanBundle`.
    
    Contains a collection of resources
    
    *   Rule: total only when a search or history
    *   Rule: entry.search only when a search
    *   Rule: entry.request mandatory for batch/transaction/history, otherwise prohibited
    *   Rule: entry.response mandatory for batch-response/transaction-response/history, otherwise prohibited
    *   Rule: FullUrl must be unique in a bundle, or else entries with the same fullUrl must have different meta.versionId (except in history bundles)
    *   Rule: A document must have an identifier with a system and a value
    *   Rule: A document must have a date
    *   Rule: A document must have a Composition as the first resource
    *   Rule: A message must have a MessageHeader as the first resource Elements defined in Ancestors: id, meta, implicitRules, language
    
    _Example_
    
    ```
    {
        "resourceType": "Bundle",
        "id": "bba1eb2e-2c47-460f-ade2-6ca8a55741a5",
        "meta": {
            "lastUpdated": "2023-05-04T17:56:44.628+05:30"
        },
        "type": "searchset",
        "total": 1,
        "link": [
            {
                "relation": "self",
                "url": "https://localhost:8092/care-management/fhir-r4/v1/CarePlan?patient=001RO000004bNW6YAM&category=assess-plan"
            }
        ],
        "entry": [
            {
                "fullUrl": "https://localhost:8092/care-management/fhir-r4/v1/CarePlan/1spRO00000000i7YAA",
                "search": {
                    "mode": "match"
                },
                "resource": {
                    "resourceType": "CarePlan",
                    "id": "1spRO00000000i7YAA",
                    "identifier": [
                        {
                            "use": "usual",
                            "value": "12000723457689870",
                            "system": "urn:custom:sourcesystem:fhirid"
                        }
                    ],
                    "basedOn": [
                        {
                            "reference": "CarePlan/1spRO00000000b0YAA"
                        }
                    ],
                    "replaces": [
                        {
                            "reference": "CarePlan/1spRO00000000b0YAA"
                        }
                    ],
                    "partOf": [
                        {
                            "reference": "CarePlan/1spRO00000000b0YAA"
                        }
                    ],
                    "status": "active",
                    "intent": "proposal",
                    "category": [
                        {
                            "id": "1kpCO00000000i7YWA",
                            "coding": [
                                {
                                    "system": "urn:uuid:53fefa32-fcbb-4ff8-8a92-55ee120877b7",
                                    "version": "v1",
                                    "code": "assess-plan",
                                    "display": "assess-plan"
                                }
                            ]
                        }
                    ],
                    "title": "Title of CarePlan",
                    "description": "description of CarePlan",
                    "subject": {
                        "reference": "Patient/001RO000004bNW6YAM"
                    },
                    "encounter": {
                        "reference": "Encounter/0kGRO00000001FY2AY"
                    },
                    "period": {
                        "start": "2023-05-04T06:23:57.000Z",
                        "end": "2010-05-16T00:00:00.000Z"
                    },
                    "created": "2001-05-06T00:00:00.000Z",
                    "author": {
                        "reference": "Patient/001RO000004bNW6YAM"
                    },
                    "contributor": [
                        {
                            "reference": "Practitioner/0cmRO00000002nQYAQ"
                        }
                    ],
                    "addresses": [
                        {
                            "reference": "Condition/0j4RO00000000BFYAY"
                        }
                    ],
                    "supportingInfo": [
                        {
                            "reference": "CarePlan/1spRO00000000b0YAA"
                        }
                    ],
                    "activity": [
                        {
                            "id": "1kpCO00000000i7YWA",
                            "outcomeCodeableConcept": [
                                {
                                    "coding": [
                                        {
                                            "code": "418914006molerclea",
                                            "system": "http://snomed.info/sct",
                                            "display": "Warning. May cause drowsiness. If affected, don't drive or operate machinery. Avoid any alcoholic drink (qualifier value)."
                                        }
                                    ],
                                    "text": "test text"
                                }
                            ],
                            "outcomeReference": [
                                {
                                    "reference": "Patient/001RO000004bNW6YAM"
                                }
                            ],
                            "progress": [
                                {
                                    "text": "test text"
                                }
                            ],
                            "reference": {
                                "reference": "MedicationRequest/0kmRO00000001Z3YAI"
                            },
                            "detail": {
                                "kind": "Appointment",
                                "code": {
                                    "coding": [
                                        {
                                            "code": "4189134",
                                            "system": "http://snomed.info/sct",
                                            "display": "Warning. May cause drowsiness."
                                        }
                                    ],
                                    "text": "test text"
                                },
                                "reasonReference": [
                                    {
                                        "reference": "Observation/0hIRO00000005b12AA"
                                    }
                                ],
                                "status": "not-started",
                                "statusReason": {
                                    "coding": [
                                        {
                                            "code": "hud",
                                            "system": "http://snomed.info/sct",
                                            "display": "Warning. May cause drowsiness. If affected, don't drive or operate machinery. Avoid any alcoholic drink (qualifier value)."
                                        }
                                    ],
                                    "text": "test text"
                                },
                                "doNotPerform": false,
                                "location": {
                                    "reference": "Location/0klRO000000000uYAA",
                                    "display": "Location"
                                },
                                "performer": [
                                    {
                                        "reference": "PractitionerRole/0bSRO00000001hb2AA"
                                    }
                                ],
                                "productCodeableConcept": {
                                    "coding": [
                                        {
                                            "code": "4189140063orjn",
                                            "system": "http://snomed.info/sct",
                                            "display": "Warning. May cause drowsiness. If affected, don't drive or operate machinery. Avoid any alcoholic drink (qualifier value)."
                                        }
                                    ],
                                    "text": "test text"
                                },
                                "dailyAmount": {
                                    "value": 30.0,
                                    "unit": "TAB",
                                    "code": "TAB"
                                },
                                "quantity": {
                                    "value": 30.0,
                                    "unit": "TAB",
                                    "code": "TAB"
                                },
                                "description": "test description"
                            }
                        }
                    ]
                }
            }
        ]
    }
    ```
    
*   **500** Server encountered an error while processing the request.
    
    Media type: `application/fhir+json`. Schema: `OperationOutcome`.
    
    _Example_
    
    ```
    {
        "resourceType": "OperationOutcome",
        "issue": [
            {
                "severity": "error",
                "code": "code-invalid",
                "details": {
                    "text": "Details not found."
                }
            }
        ]
    }
    ```
    
*   **503** Error connecting Salesforce.
    
    Media type: `application/fhir+json`. Schema: `OperationOutcome`.
    
    _Example: same as GET /CarePlan 500 response._
    

### POST Create a care plan record

`POST /CarePlan`

Creates a record related to the object.

#### Parameters

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

#### Request body

Media type: `application/fhir+json`. Schema: `CarePlan`.

Base Resource

_Example_

```
{
  "resourceType": "CarePlan",
  "identifier": [
    {
      "use": "usual",
      "system": "urn:custom:sourcesystem:fhirid",
      "value": "12000723abc"
    }
  ],
  "basedOn": [
    {
      "reference": "CarePlan/1spRO00000000b0YAA",
      "display": "CarePlan"
    }
  ],
  "replaces": [
    {
      "reference": "CarePlan/1spRO00000000b0YAA",
      "display": "CarePlan"
    }
  ],
  "partOf": [
    {
      "reference": "CarePlan/1spRO00000000b0YAA",
      "display": "CarePlan"
    }
  ],
  "status": "active",
  "intent": "proposal",
  "category": [
    {
      "coding": [
        {
          "system": "urn:uuid:53fefa32-fcbb-4ff8-8a92-55ee120877b7",
          "version": "v1",
          "code": "assess-plan",
          "display": "assess-plan",
          "userSelected": true
        }
      ],
      "text": "sample text"
    }
  ],
  "title": "Title of CarePlan",
  "description": "Description of CarePlan",
  "subject": {
    "reference": "Patient/001RO000004bNW6YAM",
    "display": "Patient"
  },
  "encounter": {
    "reference": "Encounter/0kGRO00000001FY2AY",
    "display": "Encounter"
  },
  "period": {
    "start": "2001-05-06",
    "end": "2010-05-16"
  },
  "created": "2001-05-06",
  "author": {
    "reference": "Patient/001RO000004bNW6YAM",
    "display": "Patient"
  },
  "contributor": [
    {
      "reference": "Practitioner/0cmRO00000002nQYAQ",
      "display": "Practitioner"
    }
  ],
  "addresses": [
    {
      "reference": "Condition/0j4RO00000000BFYAY",
      "display": "Condition"
    }
  ],
  "supportingInfo": [
    {
      "reference": "CarePlan/1spRO00000000b0YAA",
      "display": "Resource"
    }
  ],
  "activity": [
    {
      "outcomeCodeableConcept": [
        {
          "coding": [
            {
              "system": "http://snomed.info/sct",
              "code": "418914006molerclea",
              "display": "Warning. May cause drowsiness. If affected, don't drive or operate machinery. Avoid any alcoholic drink (qualifier value)."
            }
          ],
          "text": "test text"
        }
      ],
      "outcomeReference": [
        {
          "reference": "Patient/001RO000004bNW6YAM",
          "display": "Resource"
        }
      ],
      "progress": [
        {
          "authorReference": {
            "reference": "Patient/001RO000004bNW6YAM",
            "display": "Patient"
          },
          "time": "2001-05-06",
          "text": "test text"
        }
      ],
      "reference": {
        "reference": "MedicationRequest/0kmRO00000001Z3YAI",
        "display": "MedicationRequest"
      },
      "detail": {
        "kind": "Appointment",
        "code": {
          "coding": [
            {
              "system": "http://snomed.info/sct",
              "code": "4189134",
              "display": "Warning. May cause drowsiness."
            }
          ],
          "text": "test text"
        },
        "reasonReference": [
          {
            "reference": "Observation/0hIRO00000005b12AA",
            "display": "Observation"
          }
        ],
        "status": "not-started",
        "statusReason": {
          "coding": [
            {
              "system": "http://snomed.info/sct",
              "code": "hud",
              "display": "Warning. May cause drowsiness. If affected, don't drive or operate machinery. Avoid any alcoholic drink (qualifier value)."
            }
          ],
          "text": "test text"
        },
        "doNotPerform": false,
        "scheduledPeriod": {
          "start": "2001-05-06",
          "end": "2010-05-16"
        },
        "location": {
          "reference": "Location/0klRO000000000uYAA",
          "display": "Location"
        },
        "performer": [
          {
            "reference": "PractitionerRole/0bSRO00000001hb2AA",
            "display": "PractitionerRole"
          }
        ],
        "productCodeableConcept": {
          "coding": [
            {
              "system": "http://snomed.info/sct",
              "code": "4189140063orjn",
              "display": "Warning. May cause drowsiness. If affected, don't drive or operate machinery. Avoid any alcoholic drink (qualifier value)."
            }
          ],
          "text": "test text"
        },
        "dailyAmount": {
          "value": 30,
          "unit": "TAB",
          "system": "http://terminology.hl7.org/CodeSystem/v3-orderableDrugForm",
          "code": "TAB"
        },
        "quantity": {
          "value": 30,
          "unit": "TAB",
          "system": "http://terminology.hl7.org/CodeSystem/v3-orderableDrugForm",
          "code": "TAB"
        },
        "description": "test description"
      }
    },
    {
      "outcomeCodeableConcept": [
        {
          "coding": [
            {
              "system": "http://snomed.info/sct",
              "code": "4189140063urh3",
              "display": "Warning. May cause drowsiness. If affecte, don't drive or operate machinery. Avoid any alcoholic drink (qualifier value)."
            }
          ],
          "text": "test text"
        }
      ],
      "outcomeReference": [
        {
          "reference": "Patient/001RO000004bNW6YAM",
          "display": "Resource"
        }
      ],
      "progress": [
        {
          "authorReference": {
            "reference": "Patient/001RO000004bNW6YAM",
            "display": "Resource"
          },
          "time": "2001-05-06",
          "text": "test text"
        }
      ],
      "reference": {
        "reference": "MedicationRequest/0kmRO00000001Z3YAI",
        "display": "MedicationRequest"
      },
      "detail": {
        "kind": "Appointment",
        "code": {
          "coding": [
            {
              "system": "http://snomed.info/sct",
              "code": "418914006uyqhru",
              "display": "Warning. May cause drowsiness. If affected, don't drive or operate machinery. Avoid any alcoholic drink (qualifier value)."
            }
          ],
          "text": "test text"
        },
        "reasonCode": [
          {
            "coding": [
              {
                "system": "http://snomed.info/sct",
                "code": "418914006oirkp",
                "display": "Warning. May cause drowsiness. If affected, don't drive or operate machinery. Avoid any alcoholic drink (qualifier value)."
              }
            ],
            "text": "test text"
          }
        ],
        "reasonReference": [
          {
            "reference": "Observation/0hIRO00000005b12AA",
            "display": "Observation"
          }
        ],
        "status": "not-started",
        "statusReason": {
          "coding": [
            {
              "system": "http://snomed.info/sct",
              "code": "418914006efemr",
              "display": "Warning. May cause drowsiness. If affected, don't drive or operate machinery. Avoid any alcoholic drink (qualifier value)."
            }
          ],
          "text": "test text"
        },
        "doNotPerform": false,
        "scheduledTiming": {
          "event": [
            "2023-01-01T00:00:00.000Z"
          ],
          "repeat": {
            "boundsRange": {
              "low": {
                "value": 1,
                "unit": "minutes",
                "system": "http://terminology.hl7.org/CodeSystem/v3-orderableDrugForm",
                "code": "minutes"
              },
              "high": {
                "value": 4,
                "unit": "hour",
                "system": "http://terminology.hl7.org/CodeSystem/v3-orderableDrugForm",
                "code": "hour"
              }
            },
            "count": "2",
            "countMax": "4",
            "duration": 5,
            "durationMax": 10,
            "durationUnit": "d",
            "frequency": "1",
            "frequencyMax": "2",
            "period": 2,
            "periodMax": 4,
            "periodUnit": "h",
            "dayOfWeek": [
              "mon",
              "tue"
            ],
            "timeOfDay": [
              "08:00:00"
            ],
            "when": [
              "C",
              "CM"
            ],
            "offset": "10"
          }
        },
        "location": {
          "reference": "Location/0klRO000000000uYAA",
          "display": "Location"
        },
        "performer": [
          {
            "reference": "PractitionerRole/0bSRO00000001hb2AA",
            "display": "PractitionerRole"
          }
        ],
        "productCodeableConcept": {
          "coding": [
            {
              "system": "http://snomed.info/sct",
              "code": "418914006jdcj",
              "display": "Warning. May cause drowsiness. If affected, don't drive or operate machinery. Avoid any alcoholic drink (qualifier value)."
            }
          ],
          "text": "test text"
        },
        "dailyAmount": {
          "value": 30,
          "unit": "TAB",
          "system": "http://terminology.hl7.org/CodeSystem/v3-orderableDrugForm",
          "code": "TAB"
        },
        "quantity": {
          "value": 30,
          "unit": "TAB",
          "system": "http://terminology.hl7.org/CodeSystem/v3-orderableDrugForm",
          "code": "TAB"
        },
        "description": "test description"
      }
    }
  ],
  "note": [
    {
      
      "text": "test text"
    }
  ]
}
```

#### 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/CarePlan/123`.
    
    Media type: `application/fhir+json`. Schema: `CarePlan (extended)`.
    
    Base Resource
    
    Includes all fields of `CarePlan`.
    
    *   `id` (_string_, required) Specifies the Salesforce ID of the created object.  
        Pattern: ^\[A-Za-z0-9\\-\\.\]{1,64}$.
    
    _Example_
    
    ```
    {
      "resourceType": "CarePlan",
      "identifier": [
        {
          "use": "usual",
          "system": "urn:custom:sourcesystem:fhirid",
          "value": "12000723abc"
        }
      ],
      "basedOn": [
        {
          "reference": "CarePlan/1spRO00000000b0YAA",
          "display": "CarePlan"
        }
      ],
      "replaces": [
        {
          "reference": "CarePlan/1spRO00000000b0YAA",
          "display": "CarePlan"
        }
      ],
      "partOf": [
        {
          "reference": "CarePlan/1spRO00000000b0YAA",
          "display": "CarePlan"
        }
      ],
      "status": "active",
      "intent": "proposal",
      "category": [
        {
          "coding": [
            {
              "system": "urn:uuid:53fefa32-fcbb-4ff8-8a92-55ee120877b7",
              "version": "v1",
              "code": "assess-plan",
              "display": "assess-plan",
              "userSelected": true
            }
          ],
          "text": "sample text"
        }
      ],
      "title": "Title of CarePlan",
      "description": "Description of CarePlan",
      "subject": {
        "reference": "Patient/001RO000004bNW6YAM",
        "display": "Patient"
      },
      "encounter": {
        "reference": "Encounter/0kGRO00000001FY2AY",
        "display": "Encounter"
      },
      "period": {
        "start": "2001-05-06",
        "end": "2010-05-16"
      },
      "created": "2001-05-06",
      "author": {
        "reference": "Patient/001RO000004bNW6YAM",
        "display": "Patient"
      },
      "contributor": [
        {
          "reference": "Practitioner/0cmRO00000002nQYAQ",
          "display": "Practitioner"
        }
      ],
      "addresses": [
        {
          "reference": "Condition/0j4RO00000000BFYAY",
          "display": "Condition"
        }
      ],
      "supportingInfo": [
        {
          "reference": "CarePlan/1spRO00000000b0YAA",
          "display": "Resource"
        }
      ],
      "activity": [
        {
          "outcomeCodeableConcept": [
            {
              "coding": [
                {
                  "system": "http://snomed.info/sct",
                  "code": "418914006molerclea",
                  "display": "Warning. May cause drowsiness. If affected, don't drive or operate machinery. Avoid any alcoholic drink (qualifier value)."
                }
              ],
              "text": "test text"
            }
          ],
          "outcomeReference": [
            {
              "reference": "Patient/001RO000004bNW6YAM",
              "display": "Resource"
            }
          ],
          "progress": [
            {
              "authorReference": {
                "reference": "Patient/001RO000004bNW6YAM",
                "display": "Patient"
              },
              "time": "2001-05-06",
              "text": "test text"
            }
          ],
          "reference": {
            "reference": "MedicationRequest/0kmRO00000001Z3YAI",
            "display": "MedicationRequest"
          },
          "detail": {
            "kind": "Appointment",
            "code": {
              "coding": [
                {
                  "system": "http://snomed.info/sct",
                  "code": "4189134",
                  "display": "Warning. May cause drowsiness."
                }
              ],
              "text": "test text"
            },
            "reasonReference": [
              {
                "reference": "Observation/0hIRO00000005b12AA",
                "display": "Observation"
              }
            ],
            "status": "not-started",
            "statusReason": {
              "coding": [
                {
                  "system": "http://snomed.info/sct",
                  "code": "hud",
                  "display": "Warning. May cause drowsiness. If affected, don't drive or operate machinery. Avoid any alcoholic drink (qualifier value)."
                }
              ],
              "text": "test text"
            },
            "doNotPerform": false,
            "scheduledPeriod": {
              "start": "2001-05-06",
              "end": "2010-05-16"
            },
            "location": {
              "reference": "Location/0klRO000000000uYAA",
              "display": "Location"
            },
            "performer": [
              {
                "reference": "PractitionerRole/0bSRO00000001hb2AA",
                "display": "PractitionerRole"
              }
            ],
            "productCodeableConcept": {
              "coding": [
                {
                  "system": "http://snomed.info/sct",
                  "code": "4189140063orjn",
                  "display": "Warning. May cause drowsiness. If affected, don't drive or operate machinery. Avoid any alcoholic drink (qualifier value)."
                }
              ],
              "text": "test text"
            },
            "dailyAmount": {
              "value": 30,
              "unit": "TAB",
              "system": "http://terminology.hl7.org/CodeSystem/v3-orderableDrugForm",
              "code": "TAB"
            },
            "quantity": {
              "value": 30,
              "unit": "TAB",
              "system": "http://terminology.hl7.org/CodeSystem/v3-orderableDrugForm",
              "code": "TAB"
            },
            "description": "test description"
          }
        },
        {
          "outcomeCodeableConcept": [
            {
              "coding": [
                {
                  "system": "http://snomed.info/sct",
                  "code": "4189140063urh3",
                  "display": "Warning. May cause drowsiness. If affected, don't drive or operate machinery. Avoid any alcoholic drink (qualifier value)."
                }
              ],
              "text": "test text"
            }
          ],
          "outcomeReference": [
            {
              "reference": "Patient/001RO000004bNW6YAM",
              "display": "Resource"
            }
          ],
          "progress": [
            {
              "authorReference": {
                "reference": "Patient/001RO000004bNW6YAM",
                "display": "Resource"
              },
              "time": "2001-05-06",
              "text": "test text"
            }
          ],
          "reference": {
            "reference": "MedicationRequest/0kmRO00000001Z3YAI",
            "display": "MedicationRequest"
          },
          "detail": {
            "kind": "Appointment",
            "code": {
              "coding": [
                {
                  "system": "http://snomed.info/sct",
                  "code": "418914006uyqhru",
                  "display": "Warning. May cause drowsiness. If affected, don't drive or operate machinery. Avoid any alcoholic drink (qualifier value)."
                }
              ],
              "text": "test text"
            },
            "reasonCode": [
              {
                "coding": [
                  {
                    "system": "http://snomed.info/sct",
                    "code": "418914006oirkp",
                    "display": "Warning. May cause drowsiness. If affected, don't drive or operate machinery. Avoid any alcoholic drink (qualifier value)."
                  }
                ],
                "text": "test text"
              }
            ],
            "reasonReference": [
              {
                "reference": "Observation/0hIRO00000005b12AA",
                "display": "Observation"
              }
            ],
            "status": "not-started",
            "statusReason": {
              "coding": [
                {
                  "system": "http://snomed.info/sct",
                  "code": "418914006efemr",
                  "display": "Warning. May cause drowsiness. If affected, don't drive or operate machinery. Avoid any alcoholic drink (qualifier value)."
                }
              ],
              "text": "test text"
            },
            "doNotPerform": false,
            "scheduledTiming": {
              "event": [
                "2023-01-01T00:00:00.000Z"
              ],
              "repeat": {
                "boundsRange": {
                  "low": {
                    "value": 1,
                    "unit": "minutes",
                    "system": "http://terminology.hl7.org/CodeSystem/v3-orderableDrugForm",
                    "code": "minutes"
                  },
                  "high": {
                    "value": 4,
                    "unit": "hour",
                    "system": "http://terminology.hl7.org/CodeSystem/v3-orderableDrugForm",
                    "code": "hour"
                  }
                },
                "count": "2",
                "countMax": "4",
                "duration": 5,
                "durationMax": 10,
                "durationUnit": "d",
                "frequency": "1",
                "frequencyMax": "2",
                "period": 2,
                "periodMax": 4,
                "periodUnit": "h",
                "dayOfWeek": [
                  "mon",
                  "tue"
                ],
                "timeOfDay": [
                  "08:00:00"
                ],
                "when": [
                  "C",
                  "CM"
                ],
                "offset": "10"
              }
            },
            "location": {
              "reference": "Location/0klRO000000000uYAA",
              "display": "Location"
            },
            "performer": [
              {
                "reference": "PractitionerRole/0bSRO00000001hb2AA",
                "display": "PractitionerRole"
              }
            ],
            "productCodeableConcept": {
              "coding": [
                {
                  "system": "http://snomed.info/sct",
                  "code": "418914006jdcj",
                  "display": "Warning. May cause drowsiness. If affected, don't drive or operate machinery. Avoid any alcoholic drink (qualifier value)."
                }
              ],
              "text": "test text"
            },
            "dailyAmount": {
              "value": 30,
              "unit": "TAB",
              "system": "http://terminology.hl7.org/CodeSystem/v3-orderableDrugForm",
              "code": "TAB"
            },
            "quantity": {
              "value": 30,
              "unit": "TAB",
              "system": "http://terminology.hl7.org/CodeSystem/v3-orderableDrugForm",
              "code": "TAB"
            },
            "description": "test description"
          }
        }
      ],
      "note": [
        {
          
          "text": "test text"
        }
      ],
      "id": "1234"
    }
    ```
    
*   **400** Resource can’t be parsed or failed basic FHIR validation rules.
    
    Media type: `application/fhir+json`. Schema: `OperationOutcome`.
    
    _Example: same as GET /CarePlan 500 response._
    
*   **500** Server encountered an error while processing the request.
    
    Media type: `application/fhir+json`. Schema: `OperationOutcome`.
    
    _Example: same as GET /CarePlan 500 response._
    
*   **503** Error connecting Salesforce.
    
    Media type: `application/fhir+json`. Schema: `OperationOutcome`.
    
    _Example: same as GET /CarePlan 500 response._
    

### GET Retrieve a care plan record

`GET /CarePlan/{id}`

Retrieves the details of a particular object by using the object ID.

#### Parameters

*   `id` (path, id, required)
*   `X-CORRELATION-ID` (header, string)

#### Responses

*   **200** Request was successful.
    
    Media type: `application/fhir+json`. Schema: `CarePlan`.
    
    Base Resource
    
    _Example_
    
    ```
    {
        "resourceType": "CarePlan",
        "id": "1spRO00000000i7YAA",
        "identifier": [
            {
                "use": "usual",
                "value": "12000723457689870",
                "system": "urn:custom:sourcesystem:fhirid"
            }
        ],
        "basedOn": [
            {
                "reference": "CarePlan/1spRO00000000b0YAA"
            }
        ],
        "replaces": [
            {
                "reference": "CarePlan/1spRO00000000b0YAA"
            }
        ],
        "partOf": [
            {
                "reference": "CarePlan/1spRO00000000b0YAA"
            }
        ],
        "status": "active",
        "intent": "proposal",
        "category": [
            {
                "id": "1kpCO00000000i7YWA",
                "coding": [
                    {
                        "system": "urn:uuid:53fefa32-fcbb-4ff8-8a92-55ee120877b7",
                        "version": "v1",
                        "code": "assess-plan",
                        "display": "assess-plan"
                    }
                ]
            }
        ],
        "title": "Title of CarePlan",
        "description": "Description of CarePlan",
        "subject": {
            "reference": "Patient/001RO000004bNW6YAM"
        },
        "encounter": {
            "reference": "Encounter/0kGRO00000001FY2AY"
        },
        "period": {
            "start": "2023-05-04T06:23:57.000Z",
            "end": "2010-05-16T00:00:00.000Z"
        },
        "created": "2001-05-06T00:00:00.000Z",
        "author": {
            "reference": "Patient/001RO000004bNW6YAM"
        },
        "contributor": [
            {
                "reference": "Practitioner/0cmRO00000002nQYAQ"
            }
        ],
        "addresses": [
            {
                "reference": "Condition/0j4RO00000000BFYAY"
            }
        ],
        "supportingInfo": [
            {
                "reference": "CarePlan/1spRO00000000b0YAA"
            }
        ],
        "activity": [
            {
                "id": "1kpCO00000000i7YWR",
                "outcomeCodeableConcept": [
                    {
                        "coding": [
                            {
                                "code": "418914006molerclea",
                                "system": "http://snomed.info/sct",
                                "display": "Warning. May cause drowsiness. If affected, don't drive or operate machinery. Avoid any alcoholic drink (qualifier value)."
                            }
                        ],
                        "text": "test text"
                    }
                ],
                "outcomeReference": [
                    {
                        "reference": "Patient/001RO000004bNW6YAM"
                    }
                ],
                "progress": [
                    {
                        "text": "test text"
                    }
                ],
                "reference": {
                    "reference": "MedicationRequest/0kmRO00000001Z3YAI"
                },
                "detail": {
                    "kind": "Appointment",
                    "code": {
                        "coding": [
                            {
                                "code": "4189134",
                                "system": "http://snomed.info/sct",
                                "display": "Warning. May cause drowsiness."
                            }
                        ],
                        "text": "test text"
                    },
                    "reasonReference": [
                        {
                            "reference": "Observation/0hIRO00000005b12AA"
                        }
                    ],
                    "status": "not-started",
                    "statusReason": {
                        "coding": [
                            {
                                "code": "hud",
                                "system": "http://snomed.info/sct",
                                "display": "Warning. May cause drowsiness. If affected, don't drive or operate machinery. Avoid any alcoholic drink (qualifier value)."
                            }
                        ],
                        "text": "test text"
                    },
                    "doNotPerform": false,
                    "location": {
                        "reference": "Location/0klRO000000000uYAA",
                        "display": "Location"
                    },
                    "performer": [
                        {
                            "reference": "PractitionerRole/0bSRO00000001hb2AA"
                        }
                    ],
                    "productCodeableConcept": {
                        "coding": [
                            {
                                "code": "4189140063orjn",
                                "system": "http://snomed.info/sct",
                                "display": "Warning. May cause drowsiness. If affected, don't drive or operate machinery. Avoid any alcoholic drink (qualifier value)."
                            }
                        ],
                        "text": "test text"
                    },
                    "dailyAmount": {
                        "value": 30.0,
                        "unit": "TAB",
                        "code": "TAB"
                    },
                    "quantity": {
                        "value": 30.0,
                        "unit": "TAB",
                        "code": "TAB"
                    },
                    "description": "test description"
                }
            },
            {
                 "id": "1kpCO00000000i7YWQ",
                "outcomeCodeableConcept": [
                    {
                        "coding": [
                            {
                                "code": "4189140063urh3",
                                "system": "http://snomed.info/sct",
                                "display": "Warning. May cause drowsiness. If affected, don't drive or operate machinery. Avoid any alcoholic drink (qualifier value)."
                            }
                        ],
                        "text": "test text"
                    }
                ],
                "outcomeReference": [
                    {
                        "reference": "Patient/001RO000004bNW6YAM"
                    }
                ],
                "progress": [
                    {
                        "text": "test text"
                    }
                ],
                "reference": {
                    "reference": "MedicationRequest/0kmRO00000001Z3YAI"
                },
                "detail": {
                    "kind": "Appointment",
                    "code": {
                        "coding": [
                            {
                                "code": "418914006uyqhru",
                                "system": "http://snomed.info/sct",
                                "display": "Warning. May cause drowsiness. If affected, don't drive or operate machinery. Avoid any alcoholic drink (qualifier value)."
                            }
                        ],
                        "text": "test text"
                    },
                    "reasonCode": [
                        {
                            "coding": [
                                {
                                    "code": "418914006oirkp",
                                    "system": "http://snomed.info/sct",
                                    "display": "Warning. May cause drowsiness. If affected, don't drive or operate machinery. Avoid any alcoholic drink (qualifier value)."
                                }
                            ],
                            "text": "test text"
                        }
                    ],
                    "reasonReference": [
                        {
                            "reference": "Observation/0hIRO00000005b12AA"
                        }
                    ],
                    "status": "not-started",
                    "statusReason": {
                        "coding": [
                            {
                                "code": "418914006efemr",
                                "system": "http://snomed.info/sct",
                                "display": "Warning. May cause drowsiness. If affected, don't drive or operate machinery. Avoid any alcoholic drink (qualifier value)."
                            }
                        ],
                        "text": "test text"
                    },
                    "doNotPerform": false,
                    "scheduledTiming": {
                        "event": [
                            "2023-01-01T00:00:00.000Z"
                        ],
                        "repeat": {
                            "boundsRange": {
                                "low": {
                                    "value": 1.0,
                                    "unit": "minutes",
                                    "code": "minutes"
                                },
                                "high": {
                                    "value": 4.0,
                                    "unit": "minutes",
                                    "code": "minutes"
                                }
                            },
                            "count": "2",
                            "countMax": "4",
                            "duration": 5.0,
                            "durationMax": 10.0,
                            "frequency": "1.0",
                            "frequencyMax": "2",
                            "period": 2.0,
                            "periodMax": 4.0,
                            "periodUnit": "h",
                            "when": [
                                "C"
                            ],
                            "offset": "10"
                        }
                    },
                    "location": {
                        "reference": "Location/0klRO000000000uYAA",
                        "display": "Location"
                    },
                    "performer": [
                        {
                            "reference": "PractitionerRole/0bSRO00000001hb2AA"
                        }
                    ],
                    "productCodeableConcept": {
                        "coding": [
                            {
                                "code": "418914006jdcj",
                                "system": "http://snomed.info/sct",
                                "display": "Warning. May cause drowsiness. If affected, don't drive or operate machinery. Avoid any alcoholic drink (qualifier value)."
                            }
                        ],
                        "text": "test text"
                    },
                    "dailyAmount": {
                        "value": 30.0,
                        "unit": "TAB",
                        "code": "TAB"
                    },
                    "quantity": {
                        "value": 30.0,
                        "unit": "TAB",
                        "code": "TAB"
                    },
                    "description": "test description"
                }
            }
        ],
        "note": [
            {
                "text": "test text"
            }
        ]
    }
    ```
    
*   **404** Search ID doesn’t exist.
    
    Media type: `application/fhir+json`. Schema: `OperationOutcome`.
    
    _Example: same as GET /CarePlan 500 response._
    
*   **500** Server encountered an error while processing the request.
    
    Media type: `application/fhir+json`. Schema: `OperationOutcome`.
    
    _Example: same as GET /CarePlan 500 response._
    
*   **503** Error connecting Salesforce.
    
    Media type: `application/fhir+json`. Schema: `OperationOutcome`.
    
    _Example: same as GET /CarePlan 500 response._
    

### PUT Update a care plan record

`PUT /CarePlan/{id}`

Creates a version of the resource if no resource exists or a current version of an existing resource for a given ID.

#### Parameters

*   `id` (path, id, required)
*   `X-CORRELATION-ID` (header, string)
*   `Accept` (header, string)  
    Allowed values: `application/fhir+json`.

#### Request body

Media type: `application/fhir+json`. Schema: `CarePlan`.

Base Resource

_Example_

```
{
  "resourceType": "CarePlan",
  "id": "1234",
  "identifier": [
    {
      "use": "usual",
      "system": "urn:custom:sourcesystem:fhirid",
      "value": "12000723abc"
    }
  ],
  "basedOn": [
    {
      "reference": "CarePlan/1spRO00000000b0YAA",
      "display": "CarePlan"
    }
  ],
  "replaces": [
    {
      "reference": "CarePlan/1spRO00000000b0YAA",
      "display": "CarePlan"
    }
  ],
  "partOf": [
    {
      "reference": "CarePlan/1spRO00000000b0YAA",
      "display": "CarePlan"
    }
  ],
  "status": "active",
  "intent": "proposal",
  "category": [
    {
      "id": "1kpCO00000000i7YWA",
      "coding": [
        {
          "system": "urn:uuid:53fefa32-fcbb-4ff8-8a92-55ee120877b7",
          "version": "v1",
          "code": "assess-plan",
          "display": "assess-plan",
          "userSelected": true
        }
      ],
      "text": "sample text"
    }
  ],
  "title": "Title of CarePlan",
  "description": "Description of CarePlan",
  "subject": {
    "reference": "Patient/001RO000004bNW6YAM",
    "display": "Patient"
  },
  "encounter": {
    "reference": "Encounter/0kGRO00000001FY2AY",
    "display": "Encounter"
  },
  "period": {
    "start": "2001-05-06",
    "end": "2010-05-16"
  },
  "created": "2001-05-06",
  "author": {
    "reference": "Patient/001RO000004bNW6YAM",
    "display": "Patient"
  },
  "contributor": [
    {
      "reference": "Practitioner/0cmRO00000002nQYAQ",
      "display": "Practitioner"
    }
  ],
  "addresses": [
    {
      "reference": "Condition/0j4RO00000000BFYAY",
      "display": "Condition"
    }
  ],
  "supportingInfo": [
    {
      "reference": "CarePlan/1spRO00000000b0YAA",
      "display": "Resource"
    }
  ],
  "activity": [
    {
      "id": "1kpCO00000000i7YWA",
      "outcomeCodeableConcept": [
        {
          "coding": [
            {
              "system": "http://snomed.info/sct",
              "code": "418914006molerclea",
              "display": "Warning. May cause drowsiness. If affected, don't drive or operate machinery. Avoid any alcoholic drink (qualifier value)."
            }
          ],
          "text": "test text"
        }
      ],
      "outcomeReference": [
        {
          "reference": "Patient/001RO000004bNW6YAM",
          "display": "Resource"
        }
      ],
      "progress": [
        {
          "authorReference": {
            "reference": "Patient/001RO000004bNW6YAM",
            "display": "Patient"
          },
          "time": "2001-05-06",
          "text": "test text"
        }
      ],
      "reference": {
        "reference": "MedicationRequest/0kmRO00000001Z3YAI",
        "display": "MedicationRequest"
      },
      "detail": {
        "kind": "Appointment",
        "code": {
          "coding": [
            {
              "system": "http://snomed.info/sct",
              "code": "4189134",
              "display": "Warning. May cause drowsiness."
            }
          ],
          "text": "test text"
        },
        "reasonReference": [
          {
            "reference": "Observation/0hIRO00000005b12AA",
            "display": "Observation"
          }
        ],
        "status": "not-started",
        "statusReason": {
          "coding": [
            {
              "system": "http://snomed.info/sct",
              "code": "hud",
              "display": "Warning. May cause drowsiness. If affected, don't drive or operate machinery. Avoid any alcoholic drink (qualifier value)."
            }
          ],
          "text": "test text"
        },
        "doNotPerform": false,
        "scheduledPeriod": {
          "start": "2001-05-06",
          "end": "2010-05-16"
        },
        "location": {
          "reference": "Location/0klRO000000000uYAA",
          "display": "Location"
        },
        "performer": [
          {
            "reference": "PractitionerRole/0bSRO00000001hb2AA",
            "display": "PractitionerRole"
          }
        ],
        "productCodeableConcept": {
          "coding": [
            {
              "system": "http://snomed.info/sct",
              "code": "4189140063orjn",
              "display": "Warning. May cause drowsiness. If affected, don't drive or operate machinery. Avoid any alcoholic drink (qualifier value)."
            }
          ],
          "text": "test text"
        },
        "dailyAmount": {
          "value": 30,
          "unit": "TAB",
          "system": "http://terminology.hl7.org/CodeSystem/v3-orderableDrugForm",
          "code": "TAB"
        },
        "quantity": {
          "value": 30,
          "unit": "TAB",
          "system": "http://terminology.hl7.org/CodeSystem/v3-orderableDrugForm",
          "code": "TAB"
        },
        "description": "test description"
      }
    },
    {
      "id": "1kpCO00000000i7YWA",
      "outcomeCodeableConcept": [
        {
          "coding": [
            {
              "system": "http://snomed.info/sct",
              "code": "4189140063urh3",
              "display": "Warning. May cause drowsiness. If affected, don't drive or operate machinery. Avoid any alcoholic drink (qualifier value)."
            }
          ],
          "text": "test text"
        }
      ],
      "outcomeReference": [
        {
          "reference": "Patient/001RO000004bNW6YAM",
          "display": "Resource"
        }
      ],
      "progress": [
        {
          "authorReference": {
            "reference": "Patient/001RO000004bNW6YAM",
            "display": "Resource"
          },
          "time": "2001-05-06",
          "text": "test text"
        }
      ],
      "reference": {
        "reference": "MedicationRequest/0kmRO00000001Z3YAI",
        "display": "MedicationRequest"
      },
      "detail": {
        "kind": "Appointment",
        "code": {
          "coding": [
            {
              "system": "http://snomed.info/sct",
              "code": "418914006uyqhru",
              "display": "Warning. May cause drowsiness. If affected, don't drive or operate machinery. Avoid any alcoholic drink (qualifier value)."
            }
          ],
          "text": "test text"
        },
        "reasonCode": [
          {
            "coding": [
              {
                "system": "http://snomed.info/sct",
                "code": "418914006oirkp",
                "display": "Warning. May cause drowsiness. If affected, don't drive or operate machinery. Avoid any alcoholic drink (qualifier value)."
              }
            ],
            "text": "test text"
          }
        ],
        "reasonReference": [
          {
            "reference": "Observation/0hIRO00000005b12AA",
            "display": "Observation"
          }
        ],
        "status": "not-started",
        "statusReason": {
          "coding": [
            {
              "system": "http://snomed.info/sct",
              "code": "418914006efemr",
              "display": "Warning. May cause drowsiness. If affected, don't drive or operate machinery. Avoid any alcoholic drink (qualifier value)."
            }
          ],
          "text": "test text"
        },
        "doNotPerform": false,
        "scheduledTiming": {
          "event": [
            "2023-01-01T00:00:00.000Z"
          ],
          "repeat": {
            "boundsRange": {
              "low": {
                "value": 1,
                "unit": "minutes",
                "system": "http://terminology.hl7.org/CodeSystem/v3-orderableDrugForm",
                "code": "minutes"
              },
              "high": {
                "value": 4,
                "unit": "hour",
                "system": "http://terminology.hl7.org/CodeSystem/v3-orderableDrugForm",
                "code": "hour"
              }
            },
            "count": "2",
            "countMax": "4",
            "duration": 5,
            "durationMax": 10,
            "durationUnit": "d",
            "frequency": "1",
            "frequencyMax": "2",
            "period": 2,
            "periodMax": 4,
            "periodUnit": "h",
            "dayOfWeek": [
              "mon",
              "tue"
            ],
            "timeOfDay": [
              "08:00:00"
            ],
            "when": [
              "C",
              "CM"
            ],
            "offset": "10"
          }
        },
        "location": {
          "reference": "Location/0klRO000000000uYAA",
          "display": "Location"
        },
        "performer": [
          {
            "reference": "PractitionerRole/0bSRO00000001hb2AA",
            "display": "PractitionerRole"
          }
        ],
        "productCodeableConcept": {
          "coding": [
            {
              "system": "http://snomed.info/sct",
              "code": "418914006jdcj",
              "display": "Warning. May cause drowsiness. If affected, don't drive or operate machinery. Avoid any alcoholic drink (qualifier value)."
            }
          ],
          "text": "test text"
        },
        "dailyAmount": {
          "value": 30,
          "unit": "TAB",
          "system": "http://terminology.hl7.org/CodeSystem/v3-orderableDrugForm",
          "code": "TAB"
        },
        "quantity": {
          "value": 30,
          "unit": "TAB",
          "system": "http://terminology.hl7.org/CodeSystem/v3-orderableDrugForm",
          "code": "TAB"
        },
        "description": "test description"
      }
    }
  ],
  "note": [
    {
      
      "text": "test text"
    }
  ]
}
```

#### Responses

*   **200** Updated the resource.
    
    Headers:
    
    *   `Location` (string, required) Specifies the URL where the resource can be fetched in subsequent requests.  
        Example: `http://xxx/CarePlan/123`.
    
    Media type: `application/fhir+json`. Schema: `CarePlan (extended)`.
    
    Base Resource
    
    Includes all fields of `CarePlan`.
    
    *   `id` (_string_, required) Specifies the Salesforce ID of the updated or created object.  
        Pattern: ^\[A-Za-z0-9\\-\\.\]{1,64}$.
    
    _Example_
    
    ```
    {
      "resourceType": "CarePlan",
      "identifier": [
        {
          "use": "usual",
          "system": "urn:custom:sourcesystem:fhirid",
          "value": "12000723abc"
        }
      ],
      "basedOn": [
        {
          "reference": "CarePlan/1spRO00000000b0YAA",
          "display": "CarePlan"
        }
      ],
      "replaces": [
        {
          "reference": "CarePlan/1spRO00000000b0YAA",
          "display": "CarePlan"
        }
      ],
      "partOf": [
        {
          "reference": "CarePlan/1spRO00000000b0YAA",
          "display": "CarePlan"
        }
      ],
      "status": "active",
      "intent": "proposal",
      "category": [
        {
           "id": "1kpCO00000000i7YWA",
          "coding": [
            {
              "system": "urn:uuid:53fefa32-fcbb-4ff8-8a92-55ee120877b7",
              "version": "v1",
              "code": "assess-plan",
              "display": "assess-plan",
              "userSelected": true
            }
          ],
          "text": "sample text"
        }
      ],
      "title": "Title of CarePlan",
      "description": "Description of CarePlan",
      "subject": {
        "reference": "Patient/001RO000004bNW6YAM",
        "display": "Patient"
      },
      "encounter": {
        "reference": "Encounter/0kGRO00000001FY2AY",
        "display": "Encounter"
      },
      "period": {
        "start": "2001-05-06",
        "end": "2010-05-16"
      },
      "created": "2001-05-06",
      "author": {
        "reference": "Patient/001RO000004bNW6YAM",
        "display": "Patient"
      },
      "contributor": [
        {
          "reference": "Practitioner/0cmRO00000002nQYAQ",
          "display": "Practitioner"
        }
      ],
      "addresses": [
        {
          "reference": "Condition/0j4RO00000000BFYAY",
          "display": "Condition"
        }
      ],
      "supportingInfo": [
        {
          "reference": "CarePlan/1spRO00000000b0YAA",
          "display": "Resource"
        }
      ],
      "activity": [
        {
          "id": "1kpCO00000000i7YWA",
          "outcomeCodeableConcept": [
            {
              "coding": [
                {
                  "system": "http://snomed.info/sct",
                  "code": "418914006molerclea",
                  "display": "Warning. May cause drowsiness. If affected, don't drive or operate machinery. Avoid any alcoholic drink (qualifier value)."
                }
              ],
              "text": "test text"
            }
          ],
          "outcomeReference": [
            {
              "reference": "Patient/001RO000004bNW6YAM",
              "display": "Resource"
            }
          ],
          "progress": [
            {
              "authorReference": {
                "reference": "Patient/001RO000004bNW6YAM",
                "display": "Patient"
              },
              "time": "2001-05-06",
              "text": "test text"
            }
          ],
          "reference": {
            "reference": "MedicationRequest/0kmRO00000001Z3YAI",
            "display": "MedicationRequest"
          },
          "detail": {
            "kind": "Appointment",
            "code": {
              "coding": [
                {
                  "system": "http://snomed.info/sct",
                  "code": "4189134",
                  "display": "Warning. May cause drowsiness."
                }
              ],
              "text": "test text"
            },
            "reasonReference": [
              {
                "reference": "Observation/0hIRO00000005b12AA",
                "display": "Observation"
              }
            ],
            "status": "not-started",
            "statusReason": {
              "coding": [
                {
                  "system": "http://snomed.info/sct",
                  "code": "hud",
                  "display": "Warning. May cause drowsiness. If affected, don't drive or operate machinery. Avoid any alcoholic drink (qualifier value)."
                }
              ],
              "text": "test text"
            },
            "doNotPerform": false,
            "scheduledPeriod": {
              "start": "2001-05-06",
              "end": "2010-05-16"
            },
            "location": {
              "reference": "Location/0klRO000000000uYAA",
              "display": "Location"
            },
            "performer": [
              {
                "reference": "PractitionerRole/0bSRO00000001hb2AA",
                "display": "PractitionerRole"
              }
            ],
            "productCodeableConcept": {
              "coding": [
                {
                  "system": "http://snomed.info/sct",
                  "code": "4189140063orjn",
                  "display": "Warning. May cause drowsiness. If affected, don't drive or operate machinery. Avoid any alcoholic drink (qualifier value)."
                }
              ],
              "text": "test text"
            },
            "dailyAmount": {
              "value": 30,
              "unit": "TAB",
              "system": "http://terminology.hl7.org/CodeSystem/v3-orderableDrugForm",
              "code": "TAB"
            },
            "quantity": {
              "value": 30,
              "unit": "TAB",
              "system": "http://terminology.hl7.org/CodeSystem/v3-orderableDrugForm",
              "code": "TAB"
            },
            "description": "test description"
          }
        },
        {
          "id": "1kpCO00000000i7YWA",
          "outcomeCodeableConcept": [
            {
              "coding": [
                {
                  "system": "http://snomed.info/sct",
                  "code": "4189140063urh3",
                  "display": "Warning. May cause drowsiness. If affected, don't drive or operate machinery. Avoid any alcoholic drink (qualifier value)."
                }
              ],
              "text": "test text"
            }
          ],
          "outcomeReference": [
            {
              "reference": "Patient/001RO000004bNW6YAM",
              "display": "Resource"
            }
          ],
          "progress": [
            {
              "authorReference": {
                "reference": "Patient/001RO000004bNW6YAM",
                "display": "Resource"
              },
              "time": "2001-05-06",
              "text": "test text"
            }
          ],
          "reference": {
            "reference": "MedicationRequest/0kmRO00000001Z3YAI",
            "display": "MedicationRequest"
          },
          "detail": {
            "kind": "Appointment",
            "code": {
              "coding": [
                {
                  "system": "http://snomed.info/sct",
                  "code": "418914006uyqhru",
                  "display": "Warning. May cause drowsiness. If affected, don't drive or operate machinery. Avoid any alcoholic drink (qualifier value)."
                }
              ],
              "text": "test text"
            },
            "reasonCode": [
              {
                "coding": [
                  {
                    "system": "http://snomed.info/sct",
                    "code": "418914006oirkp",
                    "display": "Warning. May cause drowsiness. If affected, don't drive or operate machinery. Avoid any alcoholic drink (qualifier value)."
                  }
                ],
                "text": "test text"
              }
            ],
            "reasonReference": [
              {
                "reference": "Observation/0hIRO00000005b12AA",
                "display": "Observation"
              }
            ],
            "status": "not-started",
            "statusReason": {
              "coding": [
                {
                  "system": "http://snomed.info/sct",
                  "code": "418914006efemr",
                  "display": "Warning. May cause drowsiness. If affected, don't drive or operate machinery. Avoid any alcoholic drink (qualifier value)."
                }
              ],
              "text": "test text"
            },
            "doNotPerform": false,
            "scheduledTiming": {
              "event": [
                "2023-01-01T00:00:00.000Z"
              ],
              "repeat": {
                "boundsRange": {
                  "low": {
                    "value": 1,
                    "unit": "minutes",
                    "system": "http://terminology.hl7.org/CodeSystem/v3-orderableDrugForm",
                    "code": "minutes"
                  },
                  "high": {
                    "value": 4,
                    "unit": "hour",
                    "system": "http://terminology.hl7.org/CodeSystem/v3-orderableDrugForm",
                    "code": "hour"
                  }
                },
                "count": "2",
                "countMax": "4",
                "duration": 5,
                "durationMax": 10,
                "durationUnit": "d",
                "frequency": "1",
                "frequencyMax": "2",
                "period": 2,
                "periodMax": 4,
                "periodUnit": "h",
                "dayOfWeek": [
                  "mon",
                  "tue"
                ],
                "timeOfDay": [
                  "08:00:00"
                ],
                "when": [
                  "C",
                  "CM"
                ],
                "offset": "10"
              }
            },
            "location": {
              "reference": "Location/0klRO000000000uYAA",
              "display": "Location"
            },
            "performer": [
              {
                "reference": "PractitionerRole/0bSRO00000001hb2AA",
                "display": "PractitionerRole"
              }
            ],
            "productCodeableConcept": {
              "coding": [
                {
                  "system": "http://snomed.info/sct",
                  "code": "418914006jdcj",
                  "display": "Warning. May cause drowsiness. If affected, don't drive or operate machinery. Avoid any alcoholic drink (qualifier value)."
                }
              ],
              "text": "test text"
            },
            "dailyAmount": {
              "value": 30,
              "unit": "TAB",
              "system": "http://terminology.hl7.org/CodeSystem/v3-orderableDrugForm",
              "code": "TAB"
            },
            "quantity": {
              "value": 30,
              "unit": "TAB",
              "system": "http://terminology.hl7.org/CodeSystem/v3-orderableDrugForm",
              "code": "TAB"
            },
            "description": "test description"
          }
        }
      ],
      "note": [
        {
          "text": "test text"
        }
      ],
      "id": "1234"
    }
    ```
    
*   **201** Resource created.
    
    Headers:
    
    *   `Location` (string, required) Specifies the URL where the resource can be fetched in subsequent requests.  
        Example: `http://xxx/CarePlan/123`.
    
    Media type: `application/fhir+json`. Schema: `CarePlan (extended)`.
    
    Base Resource
    
    Includes all fields of `CarePlan`.
    
    *   `id` (_string_, required) Specifies the Salesforce ID of the updated or created object.  
        Pattern: ^\[A-Za-z0-9\\-\\.\]{1,64}$.
    
    _Example: same as PUT /CarePlan/{id} 200 response._
    
*   **400** Resource can’t be parsed or it failed basic FHIR validation rules.
    
    Media type: `application/fhir+json`. Schema: `OperationOutcome`.
    
    _Example: same as GET /CarePlan 500 response._
    
*   **500** Server encountered an error while processing the request.
    
    Media type: `application/json`. Schema: `OperationOutcome`.
    
    _Example: same as GET /CarePlan 500 response._
    
*   **503** Error connecting Salesforce.
    
    Media type: `application/fhir+json`. Schema: `OperationOutcome`.
    
    _Example: same as GET /CarePlan 500 response._
    

### GET Retrieve goal records

`GET /Goal`

Retrieves a set of resources by using filters.

#### Parameters

*   `patient` (query, string, required) Specifies the patient for whom the goal is intended.
*   `X-CORRELATION-ID` (header, string)
*   `Accept` (header, string)  
    Allowed values: `*/*`, `application/fhir+json`.

#### Responses

*   **200**
    
    Media type: `application/fhir+json`. Schema: `GoalBundle`.
    
    Contains a collection of resources
    
    *   Rule: total only when a search or history
    *   Rule: entry.search only when a search
    *   Rule: entry.request mandatory for batch/transaction/history, otherwise prohibited
    *   Rule: entry.response mandatory for batch-response/transaction-response/history, otherwise prohibited
    *   Rule: FullUrl must be unique in a bundle, or else entries with the same fullUrl must have different meta.versionId (except in history bundles)
    *   Rule: A document must have an identifier with a system and a value
    *   Rule: A document must have a date
    *   Rule: A document must have a Composition as the first resource
    *   Rule: A message must have a MessageHeader as the first resource Elements defined in Ancestors: id, meta, implicitRules, language
    
    _Example_
    
    ```
    {
        "resourceType": "Bundle",
        "id": "06fdb439-95ed-43fc-80d6-7c8b376f8657",
        "meta": {
            "lastUpdated": "2023-05-30T19:09:06.814029+05:30"
        },
        "type": "searchset",
        "total": 1,
        "link": [
            {
                "relation": "self",
                "url": "https://localhost:8092/care-management/fhir-r4/v1/Goal?patient=001RO000004lrTr"
            }
        ],
        "entry": [
            {
                "fullUrl": "https://localhost:8092/care-management/fhir-r4/v1/Goal/1pgRO00000000cdYAA",
                "search": {
                    "mode": "match"
                },
                "resource": {
                    "resourceType": "Goal",
                    "id": "1pgRO00000000cdYAA",
                    "lifecycleStatus": "on-hold",
                    "achievementStatus": {
                        "coding": [
                            {
                                "code": "improving"
                            }
                        ]
                    },
                    "continuous": true,
                    "priority": {
                        "coding": [
                            {
                                "code": "high-priority"
                            }
                        ]
                    },
                    "description": {
                        "coding": [
                            {
                                "system": "http://terminology.hl7.org/CodeSystem/goal-priority",
                                "code": "100016-5",
                                "display": "No injury related to a laser source."
                            }
                        ],
                        "text": "Target weight is 160 to 180 lbs."
                    },
                    "subject": {
                        "reference": "Patient/001RO000004lrTrYAI"
                    },
                    "startDate": "2023-04-18",
                    "statusDate": "2016-02-14",
                    "statusReason": "Patient wants to defer weight loss.",
                    "expressedBy": {
                        "reference": "Patient/001RO0000041r3PYAQ",
                        "type": "Patient"
                    },
                    "addresses": [
                        {
                            "reference": "Observation/0hIRO00000005XO2AY",
                            "type": "Observation"
                        },
                        {
                            "reference": "MedicationStatement/0juRO00000001O9YAI",
                            "type": "MedicationStatement"
                        }
                    ],
                    "outcomeCode": [
                        {
                            "coding": [
                                {
                                    "system": "http://terminology.hl7.org/CodeSystem/goal-priority",
                                    "code": "568005",
                                    "display": "Habit disorder"
                                }
                            ],
                            "text": "Goal Outcome Bundle"
                        },
                        {
                            "coding": [
                                {
                                    "system": "http://terminology.hl7.org/CodeSystem/goal-priority",
                                    "code": "568006",
                                    "display": "Root work"
                                }
                            ],
                            "text": "Goal Outcome Bundle"
                        }
                    ],
                    "outcomeReference": [
                        {
                            "reference": "Observation/0hIRO00000005Uj2AI",
                            "type": "Observation"
                        },
                        {
                            "reference": "Observation/0hIRO00000005XO2AY",
                            "type": "Observation"
                        }
                    ]
                }
            }
        ]
    }
    ```
    
*   **500** Server encountered an error while processing the request.
    
    Media type: `application/fhir+json`. Schema: `OperationOutcome`.
    
    _Example: same as GET /CarePlan 500 response._
    
*   **503** Error connecting Salesforce.
    
    Media type: `application/fhir+json`. Schema: `OperationOutcome`.
    
    _Example: same as GET /CarePlan 500 response._
    

### POST Create a goal record

`POST /Goal`

Creates a record related to the object.

#### Parameters

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

#### Request body

Media type: `application/fhir+json`. Schema: `Goal`.

Base Resource

_Example_

```

{
  "resourceType" : "Goal",
  "lifecycleStatus" : "on-hold",
  "achievementStatus" : {
        "coding": [
            {
                "system": "http://snomed.info/sct",
                "code": "improving",
                "display": "Improving"
            },
            {
                "system": "https://acme.lab/resultcodes",
                "code": "achieved",
                "display": "Achieved"
            }
        ],
        "text": "Negative for Chlamydia Trachomatis rRNA"
    },
  "continuous" : true,
  "priority" : {
    "coding" : [{
      "system" : "http://terminology.hl7.org/CodeSystem/goal-priority",
      "code" : "high-priority",
      "display" : "High Priority"
    },
    {
      "system" : "http://terminology.hl7.org/CodeSystem/goal-priority",
      "code" : "low-priority",
      "display" : "Low Priority"
    }],
    "text" : "high"
  },
  "description" : {
    "coding" : [
      {
      "system" : "http://terminology.hl7.org/CodeSystem/goal-priority",
      "code" : "100016-5",
      "display" : "No injury related to a laser source."
     }
  ],
    "text" : "Target weight is 160 to 180 lbs."
  },
  "subject" : {
    "reference" : "Patient/001RO0000041r3PYAQ"
  },
  "startDate" : "2023-04-18",
  "statusDate" : "2016-02-14",
  "statusReason" : "Patient wants to defer weight loss.",
  "expressedBy": {
    "reference" : "Patient/001RO0000041r3PYAQ"
  },
  "addresses" : [
      {
    "reference" : "Observation/0hIRO00000005XO2AY"
  },
  {
    "reference" : "MedicationStatement/0juRO00000001O9YAI"
  }
  ],
  "outcomeCode" : [{
      "coding" : [
      {
      "system" : "http://terminology.hl7.org/CodeSystem/goal-priority",
      "code" : "568005",
      "display" : "Habit disorder"
     }]
  },
  {
      "coding" : [
      {
      "system" : "http://terminology.hl7.org/CodeSystem/goal-priority",
      "code" : "568006",
      "display" : "Root work"
     }]
  }
  ],
  "outcomeReference": [{
    "reference" : "Observation/0hIRO00000005Uj2AI"
  },
  {
    "reference" : "Observation/0hIRO00000005XO2AY"
  }]
}
```

#### 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/Goal/123`.
    
    Media type: `application/fhir+json`. Schema: `Goal (extended)`.
    
    Base Resource
    
    Includes all fields of `Goal`.
    
    *   `id` (_string_, required) Specifies the Salesforce ID of the created object.  
        Pattern: ^\[A-Za-z0-9\\-\\.\]{1,64}$.
    
    _Example_
    
    ```
    {
        "resourceType": "Goal",
        "lifecycleStatus": "on-hold",
        "achievementStatus": {
            "coding": [
                {
                    "system": "http://snomed.info/sct",
                    "code": "improving",
                    "display": "Improving"
                },
                {
                    "system": "https://acme.lab/resultcodes",
                    "code": "achieved",
                    "display": "Achieved"
                }
            ],
            "text": "Negative for Chlamydia Trachomatis rRNA"
        },
        "continuous": true,
        "priority": {
            "coding": [
                {
                    "system": "http://terminology.hl7.org/CodeSystem/goal-priority",
                    "code": "high-priority",
                    "display": "High Priority"
                },
                {
                    "system": "http://terminology.hl7.org/CodeSystem/goal-priority",
                    "code": "low-priority",
                    "display": "Low Priority"
                }
            ],
            "text": "high"
        },
        "description": {
            "coding": [
                {
                    "system": "http://terminology.hl7.org/CodeSystem/goal-priority",
                    "code": "100016-5",
                    "display": "No injury related to a laser source."
                }
            ],
            "text": "Target weight is 160 to 180 lbs."
        },
        "subject": {
            "reference": "Patient/001RO0000041r3PYAQ"
        },
        "startDate": "2023-04-18",
        "statusDate": "2016-02-14",
        "statusReason": "Patient wants to defer weight loss.",
        "expressedBy": {
            "reference": "Patient/001RO0000041r3PYAQ"
        },
        "addresses": [
            {
                "reference": "Observation/0hIRO00000005XO2AY"
            },
            {
                "reference": "MedicationStatement/0juRO00000001O9YAI"
            }
        ],
        "outcomeCode": [
            {
                "coding": [
                    {
                        "system": "http://terminology.hl7.org/CodeSystem/goal-priority",
                        "code": "568005",
                        "display": "Habit disorder"
                    }
                ]
            },
            {
                "coding": [
                    {
                        "system": "http://terminology.hl7.org/CodeSystem/goal-priority",
                        "code": "568006",
                        "display": "Root work"
                    }
                ]
            }
        ],
        "outcomeReference": [
            {
                "reference": "Observation/0hIRO00000005Uj2AI"
            },
            {
                "reference": "Observation/0hIRO00000005XO2AY"
            }
        ],
        "id": "1pgRO00000000cTYAQ"
    }
    ```
    
*   **400** Resource can’t be parsed or failed basic FHIR validation rules.
    
    Media type: `application/fhir+json`. Schema: `OperationOutcome`.
    
    _Example: same as GET /CarePlan 500 response._
    
*   **500** Server encountered an error while processing the request.
    
    Media type: `application/fhir+json`. Schema: `OperationOutcome`.
    
    _Example: same as GET /CarePlan 500 response._
    
*   **503** Error connecting Salesforce.
    
    Media type: `application/fhir+json`. Schema: `OperationOutcome`.
    
    _Example: same as GET /CarePlan 500 response._
    

### GET Retrieve a goal record

`GET /Goal/{id}`

Retrieves the details of a particular object by using the object ID.

#### Parameters

*   `id` (path, id, required)
*   `X-CORRELATION-ID` (header, string)

#### Responses

*   **200** Request was successful.
    
    Media type: `application/fhir+json`. Schema: `Goal`.
    
    Base Resource
    
    _Example_
    
    ```
    {
        "resourceType": "Goal",
        "id": "1pgRO00000000WpYAI",
        "lifecycleStatus": "on-hold",
        "achievementStatus": {
            "coding": [
                {
                    "code": "improving"
                }
            ]
        },
        "continuous": true,
        "priority": {
            "coding": [
                {
                    "code": "high-priority"
                }
            ]
        },
        "description": {
            "coding": [
                {
                    "system": "http://terminology.hl7.org/CodeSystem/goal-priority",
                    "code": "100016-5",
                    "display": "No injury related to a laser source."
                }
            ],
            "text": "Target weight is 160 to 180 lbs."
        },
        "subject": {
            "reference": "Patient/001RO0000041r3PYAQ"
        },
        "startDate": "2023-04-18",
        "statusDate": "2016-02-14",
        "statusReason": "Patient wants to defer weight loss.",
        "expressedBy": {
            "reference": "Patient/001RO000004RDGUYA4",
            "type": "Patient"
        },
        "addresses": [
            {
                "reference": "Observation/0hIRO00000005XO2AY",
                "type": "Observation"
            },
            {
                "reference": "MedicationStatement/0juRO00000001O9YAI",
                "type": "MedicationStatement"
            }
        ],
        "outcomeCode": [
            {
                "coding": [
                    {
                        "system": "http://terminology.hl7.org/CodeSystem/goal-priority",
                        "code": "568005",
                        "display": "Habit disorder"
                    }
                ],
                "text": "Goal Outcome Bundle"
            },
            {
                "coding": [
                    {
                        "system": "http://terminology.hl7.org/CodeSystem/goal-priority",
                        "code": "568006",
                        "display": "Root work"
                    }
                ],
                "text": "Goal Outcome Bundle"
            }
        ],
        "outcomeReference": [
            {
                "reference": "Observation/0hIRO00000005Uj2AI",
                "type": "Observation"
            },
            {
                "reference": "Observation/0hIRO00000005XO2AY",
                "type": "Observation"
            }
        ]
    }
    ```
    
*   **404** Search ID doesn’t exist.
    
    Media type: `application/fhir+json`. Schema: `OperationOutcome`.
    
    _Example: same as GET /CarePlan 500 response._
    
*   **500** Server encountered an error while processing the request.
    
    Media type: `application/fhir+json`. Schema: `OperationOutcome`.
    
    _Example: same as GET /CarePlan 500 response._
    
*   **503** Error connecting Salesforce.
    
    Media type: `application/fhir+json`. Schema: `OperationOutcome`.
    
    _Example: same as GET /CarePlan 500 response._
    

### PUT Update a goal record

`PUT /Goal/{id}`

Creates a version of the resource if no resource exists or a current version of an existing resource for a given ID.

#### Parameters

*   `id` (path, id, required)
*   `X-CORRELATION-ID` (header, string)
*   `Accept` (header, string)  
    Allowed values: `application/fhir+json`.

#### Request body

Media type: `application/fhir+json`. Schema: `Goal`.

Base Resource

_Example_

```
{
  "resourceType" : "Goal",
  "id": "1pgRO00000000cYYAQ",
  "lifecycleStatus" : "on-hold",
  "achievementStatus" : {
		"coding": [
			{
				"system": "http://snomed.info/sct",
				"code": "improving",
				"display": "Improving"
			}, 
            {
				"system": "https://acme.lab/resultcodes",
				"code": "achieved",
				"display": "Achieved"
			}
		],
		"text": "Negative for Chlamydia Trachomatis rRNA"
	},
  "continuous" : true,
  "priority" : {
    "coding" : [{
      "system" : "http://terminology.hl7.org/CodeSystem/goal-priority",
      "code" : "high-priority",
      "display" : "High Priority"
    },
    {
      "system" : "http://terminology.hl7.org/CodeSystem/goal-priority",
      "code" : "low-priority",
      "display" : "Low Priority"
    }],
    "text" : "high priority"
  },
  "description" : {
    "coding" : [
      {
      "system" : "http://terminology.hl7.org/CodeSystem/goal-priority",
      "code" : "100016-5",
      "display" : "No injury related to a laser source."
     }
  ],
    "text" : "Target weight is 160 to 170 lbs."
  },
  "subject" : {
    "reference" : "Patient/001RO0000041r3PYAQ"
  },
  "startDate" : "2023-04-18",
  "statusDate" : "2016-02-14",
  "statusReason" : "Patient wants to defer weight loss.",
  "expressedBy": {
    "reference" : "Patient/001RO0000041r3PYAQ"
  },
  "addresses" : [
      {
    "reference" : "Observation/0hIRO00000005Y22AI"
  },
  {
    "reference" : "MedicationStatement/0juRO00000001O9YAI"
  }
  ],
  "outcomeCode" : [{
      "coding" : [
      {
      "system" : "http://terminology.hl7.org/CodeSystem/goal-priority",
      "code" : "5680051",
      "display" : "Habit disorder"
     },
     {
      "system" : "http://terminology.hl7.org/CodeSystem/goal-priority",
      "code" : "5680059",
      "display" : "Habit disorder"
     }]
  },
  {
      "coding" : [
      {
      "system" : "http://terminology.hl7.org/CodeSystem/goal-priority",
      "code" : "5680061",
      "display" : "Root work"
     }]
  }
  ],
  "outcomeReference": [{
    "reference" : "Observation/0hIRO00000005Y22AI"
  },
  {
    "reference" : "Observation/0hIRO00000005XO2AY"
  }]
}
```

#### Responses

*   **200** Updated the resource.
    
    Headers:
    
    *   `Location` (string, required) Specifies the URL where the resource can be fetched in subsequent requests.  
        Example: `http://xxx/Goal/123`.
    
    Media type: `application/fhir+json`. Schema: `Goal (extended)`.
    
    Base Resource
    
    Includes all fields of `Goal`.
    
    *   `id` (_string_, required) Specifies the Salesforce ID of the updated or created object.  
        Pattern: ^\[A-Za-z0-9\\-\\.\]{1,64}$.
    
    _Example_
    
    ```
    {
        "resourceType": "Goal",
        "lifecycleStatus": "on-hold",
        "achievementStatus": {
            "coding": [
                {
                    "system": "http://snomed.info/sct",
                    "code": "improving",
                    "display": "Improving"
                },
                {
                    "system": "https://acme.lab/resultcodes",
                    "code": "achieved",
                    "display": "Achieved"
                }
            ],
            "text": "Negative for Chlamydia Trachomatis rRNA"
        },
        "continuous": true,
        "priority": {
            "coding": [
                {
                    "system": "http://terminology.hl7.org/CodeSystem/goal-priority",
                    "code": "high-priority",
                    "display": "High Priority"
                },
                {
                    "system": "http://terminology.hl7.org/CodeSystem/goal-priority",
                    "code": "low-priority",
                    "display": "Low Priority"
                }
            ],
            "text": "high priority"
        },
        "description": {
            "coding": [
                {
                    "system": "http://terminology.hl7.org/CodeSystem/goal-priority",
                    "code": "100016-5",
                    "display": "No injury related to a laser source."
                }
            ],
            "text": "Target weight is 160 to 170 lbs."
        },
        "subject": {
            "reference": "Patient/001RO0000041r3PYAQ"
        },
        "startDate": "2023-04-18",
        "statusDate": "2016-02-14",
        "statusReason": "Patient wants to defer weight loss.",
        "expressedBy": {
            "reference": "Patient/001RO0000041r3PYAQ"
        },
        "addresses": [
            {
                "reference": "Observation/0hIRO00000005Y22AI"
            },
            {
                "reference": "MedicationStatement/0juRO00000001O9YAI"
            }
        ],
        "outcomeCode": [
            {
                "coding": [
                    {
                        "system": "http://terminology.hl7.org/CodeSystem/goal-priority",
                        "code": "5680051",
                        "display": "Habit disorder"
                    },
                    {
                        "system": "http://terminology.hl7.org/CodeSystem/goal-priority",
                        "code": "5680059",
                        "display": "Habit disorder"
                    }
                ]
            },
            {
                "coding": [
                    {
                        "system": "http://terminology.hl7.org/CodeSystem/goal-priority",
                        "code": "5680061",
                        "display": "Root work"
                    }
                ]
            }
        ],
        "outcomeReference": [
            {
                "reference": "Observation/0hIRO00000005Y22AI"
            },
            {
                "reference": "Observation/0hIRO00000005XO2AY"
            }
        ],
        "id": "1pgRO00000000cYYAQ"
    }
    ```
    
*   **201** Resource created.
    
    Headers:
    
    *   `Location` (string, required) Specifies the URL where the resource can be fetched in subsequent requests.  
        Example: `http://xxx/Goal/123`.
    
    Media type: `application/fhir+json`. Schema: `Goal (extended)`.
    
    Base Resource
    
    Includes all fields of `Goal`.
    
    *   `id` (_string_, required) Specifies the Salesforce ID of the updated or created object.  
        Pattern: ^\[A-Za-z0-9\\-\\.\]{1,64}$.
    
    _Example: same as PUT /Goal/{id} 200 response._
    
*   **400** Resource can’t be parsed or it failed basic FHIR validation rules.
    
    Media type: `application/fhir+json`. Schema: `OperationOutcome`.
    
    _Example: same as GET /CarePlan 500 response._
    
*   **500** Server encountered an error while processing the request.
    
    Media type: `application/json`. Schema: `OperationOutcome`.
    
    _Example: same as GET /CarePlan 500 response._
    
*   **503** Error connecting Salesforce.
    
    Media type: `application/fhir+json`. Schema: `OperationOutcome`.
    
    _Example: same as GET /CarePlan 500 response._
    

## Schemas

### CarePlanBundle

Includes all fields of `Bundle`.

*   `entry` (_array of CarePlanEntry_)

### OperationOutcome

Information about the success or failure of an action. Elements defined in Ancestors id, meta, implicitRules, language, text, contained, extension, modifierExtension.

Includes all fields of `Resource`.

*   `issue` (_array of object_, required)
    *   `severity` (_code (string)_, required) fatal | error | warning | information  
        Allowed values: `fatal`, `error`, `warning`, `information`.
    *   `code` (_code (string)_, required) Error or warning code  
        Allowed values: `invalid`, `structure`, `required`, `value`, `invariant`, `security`, `login`, `unknown`, `expired`, `forbidden`, `suppressed`, `processing`, `not-supported`, `duplicate`, `multiple-matches`, `not-found`, `deleted`, `too-long`, `code-invalid`, `extension`, `too-costly`, `business-rule`, `conflict`, `transient`, `lock-error`, `no-store`, `exception`, `timeout`, `incomplete`, `throttled`, `informational`.
    *   `details` (_object_) Additional details about the error
        
        Includes all fields of `CodeableConcept`.
        

### CarePlan

Includes all fields of `Resource`.

*   `identifier` (_array of Identifier_) Specifies the business identifier.
*   `basedOn` (_array of Reference_) Fulfills care plan.
*   `replaces` (_array of Reference_) Specifies the care plan that's replaced by this care plan.
*   `partOf` (_array of Reference_) Part of referenced care plan.
*   `status` (_code (string)_, required) draft | active | on-hold | revoked | completed | entered-in-error | unknown Binding: RequestStatus (required): Indicates whether the plan is currently being acted upon, represents future intentions, or is now a historical record.  
    Allowed values: `draft`, `active`, `on-hold`, `revoked`, `completed`, `entered-in-error | unknown`.
*   `intent` (_code (string)_, required) proposal | plan | order | option Binding: CarePlanIntent (required): Codes indicating the degree of authority or intentionality associated with a care plan.  
    Allowed values: `proposal`, `plan`, `order`, `option`.
*   `category` (_array of CodeableConcept_, required) Specifies the type of plan.
*   `title` (_string_, required) Specifies the human-friendly name for the care plan.
*   `description` (_string_) Specifies the summary of the nature of a plan.
*   `subject` (_object_, required) Specifies who the care plan is for.
    
    Includes all fields of `Reference`.
    
*   `encounter` (_object_) Specifies the reference (Encounter) encounter that the care plan was a part of.
    
    Includes all fields of `Reference`.
    
*   `period` (_object_) Specifies the time period that the plan covers. The 'period.start' property can't be edited or updated.
    
    Includes all fields of `Period`.
    
*   `created` (_dateTime (string)_) Specifies when the care plan is first recorded. If present, then created property must be less than the 'period.end' property.
*   `author` (_object_) Specifies who is the designated responsible party.
    
    Includes all fields of `Reference`.
    
*   `contributor` (_array of Reference_) Specifies who provided the content of the care plan.
*   `addresses` (_array of Reference_) Specifies the health issues this plan addresses.
*   `supportingInfo` (_array of Reference_) Specifies any supporting information that's considered as part of the care plan.
*   `activity` (_array of object_) Specifies the action to occur as part of the care plan.
    
    Includes all fields of `BackboneElement`.
    
    *   `outcomeCodeableConcept` (_array of CodeableConcept_) Specifies the results of the activity.
    *   `outcomeReference` (_array of Reference_) Specifies the reference to the outcome, such as appointment, encounter, or procedure.
    *   `progress` (_array of Annotation_) Specifies the comments about the activity status or progress.
    *   `reference` (_object_) Specifies the activity details defined in the specific resource.
        
        Includes all fields of `Reference`.
        
    *   `detail` (_object_) Specifies the in-line definition of the activity.
        
        Includes all fields of `BackboneElement`.
        
        *   `kind` (_code (string)_) Appointment | Communication Request | Device Request | Medication Request | Nutrition Order | Task | Service Request | Vision Prescription  
            Allowed values: `Appointment`, `Communication Request`, `Device Request`, `Medication Request`, `Nutrition Order`, `Task`, `Service Request`, `Vision Prescription`.
        *   `code` (_object_) Specifies the detail type of the activity.
            
            Includes all fields of `CodeableConcept`.
            
        *   `reasonCode` (_array of CodeableConcept_) Identifies why a care plan activity is needed. Can include any health condition codes as well as such concepts as "general wellness", prophylaxis, surgical preparation, etc.
        *   `reasonReference` (_array of Reference_) Specifies why the activity is required.
        *   `status` (_code (string)_, required) not-started | scheduled | in-progress | on-hold | completed | cancelled | stopped | unknown | entered-in-error  
            Allowed values: `not-started`, `scheduled`, `in-progress`, `on-hold`, `completed`, `cancelled`, `stopped`, `unknown`, `entered-in-error`.
        *   `statusReason` (_object_) Specifies the reason for the current status.
            
            Includes all fields of `CodeableConcept`.
            
        *   `doNotPerform` (_boolean_) Indicates whether the activity is prohibiting the action (true) or not (false).
        *   `scheduled` (_scheduledscheduledTiming | scheduledscheduledPeriod | scheduledscheduledString_) Specifies when the activity is to occur.
            
            One of: `scheduledscheduledTiming`, `scheduledscheduledPeriod`, `scheduledscheduledString`.
            
        *   `location` (_object_) Specifies the location of the activity.
            
            Includes all fields of `Reference`.
            
        *   `performer` (_array of Reference_) Specifies who is responsible for the activity.
        *   `product` (_productproductCodeableConcept | productproductReference_) Specifies the product to administer or supply.
            
            One of: `productproductCodeableConcept`, `productproductReference`.
            
        *   `dailyAmount` (_object_) Specifies the quantity of the administered vaccine.
            
            Includes all fields of `SimpleQuantity`.
            
        *   `quantity` (_object_) Specifies the quantity of the administered vaccine.
            
            Includes all fields of `SimpleQuantity`.
            
        *   `description` (_string_) Specifies additional information describing the activity.
*   `note` (_array of Annotation_) comments about the plan

### id

Any combination of upper or lower case ASCII letters ('A'..'Z', and 'a'..'z', numerals ('0'..'9'), '-' and '.', with a length limit of 64 characters. (This might be an integer, an un-prefixed OID, UUID or any other identifier pattern that meets these constraints.)

Type: `string`.

Pattern: ^\[A-Za-z0-9\\-\\.\]{1,64}$.

### GoalBundle

Includes all fields of `Bundle`.

*   `entry` (_array of GoalEntry_)

### Goal

Includes all fields of `Resource`.

*   `lifecycleStatus` (_code (string)_, required) proposed | planned | accepted | active | on-hold | completed | cancelled | entered-in-error | rejected  
    Allowed values: `proposed`, `planned`, `accepted`, `active`, `on-hold`, `completed`, `cancelled`, `entered-in-error`, `rejected`.
*   `achievementStatus` (_object_) in-progress | improving | worsening | no-change | achieved | sustaining | not-achieved | no-progress | not-attainable. Indicates the progression, or lack thereof, towards the goal against the target.
    
    Includes all fields of `CodeableConcept`.
    
*   `continuous` (_boolean_) Indicates whether an ongoing activity is required to sustain after meeting the goal (true) or not (false).
*   `priority` (_object_) high-priority | medium-priority | low-priority. The level of importance associated with a goal.
    
    Includes all fields of `CodeableConcept`.
    
*   `description` (_object_, required) Specifies the code or text describing the goal. The 'description.coding.code' property is mandatory for the description field.
    
    Includes all fields of `CodeableConcept`.
    
*   `subject` (_object_, required) Specifies for whom the goal is intended for.
    
    Includes all fields of `Reference`.
    
*   `start` (_startstartDate | startstartCodeableConcept_) When goal pursuit begins. Codes describing events that can trigger the initiation of a goal.
    
    One of: `startstartDate`, `startstartCodeableConcept`.
    
*   `expressedBy` (_object_) Who's responsible for creating Goal?
    
    Includes all fields of `Reference`.
    
*   `statusDate` (_date (string)_) Specifies when the goal status took effect.
*   `statusReason` (_string_) Specifies the reason for the current status.
*   `addresses` (_array of Reference_) Specifies the issues addressed by the goal.
*   `outcomeCode` (_array of CodeableConcept_) Specifies the outcome after achieving the goal.
*   `outcomeReference` (_array of Reference_) Specifies any observations that resulted from the goal.

### Bundle

Contains a collection of resources

*   Rule: total only when a search or history
*   Rule: entry.search only when a search
*   Rule: entry.request mandatory for batch/transaction/history, otherwise prohibited
*   Rule: entry.response mandatory for batch-response/transaction-response/history, otherwise prohibited
*   Rule: FullUrl must be unique in a bundle, or else entries with the same fullUrl must have different meta.versionId (except in history bundles)
*   Rule: A document must have an identifier with a system and a value
*   Rule: A document must have a date
*   Rule: A document must have a Composition as the first resource
*   Rule: A message must have a MessageHeader as the first resource Elements defined in Ancestors: id, meta, implicitRules, language

Includes all fields of `Resource`.

*   `identifier` (_object_) Persistent identifier for the bundle
    
    Includes all fields of `Identifier`.
    
*   `type` (_code (string)_, required) document | message | transaction | transaction-response | batch | batch-response | history | searchset | collection  
    Allowed values: `document`, `message`, `transaction`, `transaction-response`, `batch`, `batch-response`, `history`, `searchset`, `collection`.
*   `link` (_array of object_) Links related to this Bundle
    
    Includes all fields of `BackboneElement`.
    
    *   `relation` (_string_, required) See [http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1](http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1)
    *   `url` (_uri (string)_, required) Reference details for the link
*   `entry` (_array of object_)
    
    Entry in the bundle - will have a resource or information
    
    *   Rule: must be a resource unless there's a request or response
    *   Rule: fullUrl cannot be a version specific reference This repeating element order: For bundles of type 'document' and 'message', the first resource is special (must be Composition or MessageHeader respectively). For all bundles, the meaning of the order of entries depends on the bundle type
    
    Includes all fields of `Entry`.
    

### CarePlanEntry

Includes all fields of `Entry`.

*   `resource` (_CarePlan_, required)

### Resource

Base Resource

*   `id` (_id (string)_) Specifies the logical ID of the artifact.
*   `meta` (_object_) Specifies the metadata of the resource.
    
    Includes all fields of `Meta`.
    

### code

Indicates that the value is taken from a set of controlled strings defined elsewhere (see Using codes for further discussion). Technically, a code is restricted to a string which has at least one character and no leading or trailing whitespace, and where there is no whitespace other than single spaces in the contents.

Type: `string`.

Pattern: ^\[^\\s\]+(\[\\s\]+\[^\\s\]+)\*$.

### CodeableConcept

A CodeableConcept represents a value that is usually supplied by providing a reference to one or more terminologies or ontologies, but may also be defined by the provision of text. This is a common pattern in healthcare data.

Includes all fields of `Element`.

*   `coding` (_array of Coding_) Code defined by a terminology system
*   `text` (_string_) Plain text representation of the concept

### Identifier

A numeric or alphanumeric string that is associated with a single object or entity within a given system. Typically, identifiers are used to connect content in resources to external content available in other frameworks or protocols. Identifiers are associated with objects, and may be changed or retired due to human or system process and errors.

*   `use` (_code (string)_) usual | official | temp | secondary (If known)  
    Allowed values: `usual`, `official`, `temp`, `secondary`, `old`.
*   `system` (_uri (string)_) The namespace for the identifier value
*   `value` (_string_) The value that is unique

### Reference

Many of the defined elements in a resource are references to other resources. Using these references, the resources combine to build a web of information about healthcare.

*   `reference` (_string_) Literal reference, Relative, internal or absolute URL
*   `type` (_uri (string)_) Specifies the type the reference refers to. For example, a patient.

### Period

A time period defined by a start and end date/time.

Includes all fields of `Element`.

*   `start` (_dateTime (string)_) Starting time with inclusive boundary
*   `end` (_dateTime (string)_) End time with inclusive boundary, if not ongoing

### dateTime

A date, date-time or partial date (e.g. just year or year + month) as used in human communication. If hours and minutes are specified, a time zone SHALL be populated. Seconds must be provided due to schema type constraints but may be zero-filled and may be ignored. Dates SHALL be valid dates. The time "24:00" is not allowed

Type: `string`.

Pattern: ^\[0-9\]{4}(-(0\[1-9\]|1\[0-2\])(-(0\[0-9\]|\[1-2\]\[0-9\]|3\[0-1\])(T(\[01\]\[0-9\]|2\[0-3\]):\[0-5\]\[0-9\]:\[0-5\]\[0-9\](https://./[0-9/]+)?(Z|(\\+|-)((0\[0-9\]|1\[0-3\]):\[0-5\]\[0-9\]|14:00)))?)?)?$.

### BackboneElement

Includes all fields of `Element`.

*   `modifierExtension` (_array of Extension_) Modifier Extensions

### Annotation

A text note which also contains information about who made the statement and when.

Includes all fields of `Element`.

*   `text` (_string_, required) The annotation - text content

### scheduledscheduledTiming

*   `scheduledTiming` (_object_, required) A timing schedule to specify an event that may occur multiple times.
    
    Includes all fields of `Timing`.
    

### scheduledscheduledPeriod

*   `scheduledPeriod` (_object_, required) Specifies a time range defined by a start and end date or time. + Rule - If present, start date or time must have a lower value than end date or time.
    
    Includes all fields of `Period`.
    

### scheduledscheduledString

*   `scheduledString` (_string_, required) Specifies when the activity is to occur.

### productproductCodeableConcept

*   `productCodeableConcept` (_object_, required) Specifies what is to be administered or supplied.
    
    Includes all fields of `CodeableConcept`.
    

### productproductReference

*   `productReference` (_object_, required) Specifies what is to be administered or supplied.
    
    Includes all fields of `Reference`.
    

### SimpleQuantity

The comparator is not used on a SimpleQuantity

Includes all fields of `Quantity`.

### GoalEntry

Includes all fields of `Entry`.

*   `resource` (_Goal_, required)

### startstartDate

*   `startDate` (_date (string)_, required) Specifies when the goal pursuit begins.

### startstartCodeableConcept

*   `startCodeableConcept` (_object_, required) Specifies when the goal pursuit begins.
    
    Includes all fields of `CodeableConcept`.
    

### date

A date, or partial date (e.g. just year or year + month) as used in human communication. There is no time zone. Dates SHALL be valid dates

Type: `string`.

Pattern: ^\[0-9\]{4}(-(0\[1-9\]|1\[0-2\])(-(0\[0-9\]|\[1-2\]\[0-9\]|3\[0-1\]))?)?$. Example: `1970-08-07`.

### uri

A Uniform Resource Identifier Reference (see: [https://tools.ietf.org/html/rfc3986](https://tools.ietf.org/html/rfc3986)). Note: URIs are case sensitive. For UUID (urn:uuid:53fefa32-fcbb-4ff8-8a92-55ee120877b7) use all lowercase. URIs can be absolute or relative, and may have an optional fragment identifier. Regex: \\S\*

Type: `string`.

### Entry

Entry in the bundle - will have a resource or information

*   Rule: must be a resource unless there's a request or response
*   Rule: fullUrl cannot be a version specific reference This repeating element order: For bundles of type 'document' and 'message', the first resource is special (must be Composition or MessageHeader respectively). For all bundles, the meaning of the order of entries depends on the bundle type

Includes all fields of `BackboneElement`.

*   `link` (_array of object_) Links related to this entry
    
    Includes all fields of `BackboneElement`.
    
    *   `relation` (_string_, required) See [http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1](http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1)
    *   `url` (_uri (string)_, required) Reference details for the link
*   `resource` (_object_) A resource in the bundle
    
    Includes all fields of `Resource`.
    
*   `fullUrl` (_uri (string)_) URI for resource (Absolute URL server address or URI for UUID/OID)
*   `search` (_object_) Search related information
    
    Includes all fields of `BackboneElement`.
    
    *   `mode` (_code (string)_) match | include | outcome - why this is in the result set  
        Allowed values: `match`, `include`, `outcome`.
    *   `score` (_decimal (number)_) Search ranking (between 0 and 1)
*   `request` (_object_) Additional execution information (transaction/batch/history)
    
    Includes all fields of `BackboneElement`.
    
    *   `method` (_code (string)_, required) GET | HEAD | POST | PUT | DELETE | PATCH  
        Allowed values: `GET`, `PUT`, `POST`, `DELETE`, `HEAD`, `PATCH`.
    *   `url` (_uri (string)_, required) URL for HTTP equivalent of this entry
*   `response` (_object_) Results of execution (transaction/batch/history)
    
    Includes all fields of `BackboneElement`.
    
    *   `status` (_string_, required) Status response code (text optional)
    *   `location` (_uri (string)_) The location (if the operation returns a location)
    *   `outcome` (_object_) OperationOutcome with hints and warnings (for batch/transaction)
        
        Includes all fields of `Resource`.
        

### Meta

Each resource contains an element "meta", of type "Meta", which is a set of metadata that provides technical and workflow context to the resource. The metadata items are all optional, though some or all of them may be required in particular implementations or contexts of use.

*   `profile` (_array of object_) Profiles this resource claims to conform to
    
    Each item: A URI that refers to a resource by its canonical URL (resources with a url property). The canonical type differs from a uri in that it has special meaning in this specification, and in that it may have a version appended, separated by a vertical bar (|). Note that the type canonical is not used for the actual canonical URLs that are the target of these references, but for the URIs that refer to them, and may have the version suffix in them. Like other URIs, elements of type canonical may also have #fragment references.
    
    Includes all fields of `uri`.
    

### Element

*   `id` (_id (string)_) Internal id
*   `extension` (_array of Extension_) Additional Content defined by implementations - from Element: extension (recursive)

### Coding

A Coding is a representation of a defined concept using a symbol from a defined "code system". See [http://hl7.org/fhir/STU3/terminologies.html](http://hl7.org/fhir/STU3/terminologies.html) for more details.

*   `system` (_uri (string)_) Identity of the terminology system
*   `version` (_string_) Version of the system - if relevant
*   `code` (_code (string)_) Symbol in syntax defined by the system
*   `display` (_string_) Representation defined by the system

### Extension

Optional Extensions Element + Rule Must have either extensions or value\[x\], not both Elements defined in Ancestors id, extension

Includes all fields of `Element`.

*   `url` (_uri (string)_, required) identifies the meaning of the extension
*   `value` (_enumvalueInteger | enumvalueDecimal | enumvalueDateTime_) Value of extension
    
    One of: `enumvalueInteger`, `enumvalueDecimal`, `enumvalueDateTime`.
    

### Timing

Specifies an event that may occur multiple times. Timing schedules are used for specifying when events are expected or requested to occur, and may also be used to represent a schedule that was followed for past events. A Timing schedule can be a list of events and/or criteria for when the event happens, which can be expressed in a structured form and/or as a code. When both event and a repeating specification are provided, the list of events should be understood as an interpretation of the information in the repeat structure.

Includes all fields of `Element`.

*   `event` (_array of dateTime_) When the event occurs
*   `repeat` (_object_) When the event is to occur
    
    Includes all fields of `Element`.
    
    *   `bounds` (_timingboundsDuration | timingboundsRange | timingboundsPeriod_) Length/Range of lengths, or (Start and/or end) limits
        
        One of: `timingboundsDuration`, `timingboundsRange`, `timingboundsPeriod`.
        
    *   `count` (_positiveInt (integer)_) Number of times to repeat
    *   `countMax` (_positiveInt (integer)_) Maximum number of times to repeat
    *   `duration` (_decimal (number)_) How long when it happens
    *   `durationMax` (_decimal (number)_) How long when it happens (Max)
    *   `durationUnit` (_UnitOfTime (string)_) s | min | h | d | wk | mo | a - unit of time (UCUM)
    *   `frequency` (_positiveInt (integer)_) Event occurs frequency times per period
    *   `frequencyMax` (_positiveInt (integer)_) Event occurs up to frequencyMax times per period
    *   `period` (_decimal (number)_) Event occurs frequency times per period
    *   `periodMax` (_decimal (number)_) Upper limit of period (3-4 hours)
    *   `periodUnit` (_UnitOfTime (string)_) s | min | h | d | wk | mo | a - unit of time (UCUM)  
        Allowed values: `s`, `min`, `h`, `d`, `wk`, `mo`, `a`.
    *   `when` (_code (string)_) Regular life events the event is tied to  
        Allowed values: `HS`, `WAKE`, `C`, `CM`, `CD`, `CV`, `AC`, `ACM`, `ACD`, `ACV`, `PC`, `PCM`, `PCD`, `PCV`.
    *   `offset` (_unsignedInt (integer)_) Minutes from event (before or after)
*   `code` (_object_) BID | TID | QID | AM | PM | QD | QOD | Q1H | Q2H | Q3H | Q4H | Q6H | Q8H | BED | WK | MO
    
    Includes all fields of `CodeableConcept`.
    

### Quantity

A measured amount (or an amount that can potentially be measured).

*   `value` (_decimal (number)_) Numerical value (with implicit precision)
*   `comparator` (_code (string)_) how to understand the value  
    Allowed values: `<`, `<=`, `>=`, `>`.
*   `unit` (_string_) Unit representation
*   `system` (_uri (string)_) System that defines coded unit form
*   `code` (_code (string)_) Coded form of the unit

### decimal

Rational numbers that have a decimal representation. See this regex about the precision of the number. Regex: -?(0|\[1-9\]\[0-9\]\*)(.\[0-9\]+)?(\[eE\]\[+-\]?\[0-9\]+)?

Type: `number`.

### enumvalueInteger

*   `valueInteger` (_integer_, required) Value of extension.

### enumvalueDecimal

*   `valueDecimal` (_decimal (number)_, required) Value of extension.

### enumvalueDateTime

*   `valueDateTime` (_dateTime (string)_, required) Value of extension.

### timingboundsDuration

*   `boundsDuration` (_any_, required) Length/Range of lengths, or (Start and/or end) limits

### timingboundsRange

*   `boundsRange` (_object_, required) Length/Range of lengths, or (Start and/or end) limits
    
    Includes all fields of `Range`.
    

### timingboundsPeriod

*   `boundsPeriod` (_object_, required) Length/Range of lengths, or (Start and/or end) limits
    
    Includes all fields of `Period`.
    

### positiveInt

Any positive integer (e.g. >= 1) Regex - +?\[1-9\]\[0-9\]\*

Type: `integer`.

Minimum: 1.

### UnitOfTime

A unit of time (UCUM)

Type: `code (string)`.

Allowed values: `s`, `min`, `h`, `d`, `wk`, `mo`, `a`.

### unsignedInt

Any non-negative integer (e.g. >= 0) Regex - \[0\]|(\[1-9\]\[0-9\]\*)

Type: `integer`.

Minimum: 0.

### Range

A set of ordered Quantity values defined by a low and high limit.

Includes all fields of `Element`.

*   `low` (_object_) Low limit
    
    Includes all fields of `Quantity`.
    
*   `high` (_object_) High limit
    
    Includes all fields of `Quantity`.