CreateKeyValueData_v1 - Medaxion/open_api_resources GitHub Wiki
Notes: If a datum that matches the provided key already exists, it will be updated with the new value rather than a new datum being created. The no-touch attribute must be set on every datum provided in the array to prevent setting the updated_at on the subject (case or encounter). While previously created keys cannot be deleted, they can be updated with a NIL or other unrecognizable character.
-
Method:
POST -
Content-Type:
application/jsonorapplication/xml
Available for Cases and Encounters
POST => X:{schedule_token}@{base_url}/open_api/v1/cases/case_id/ops_data.[json|xml]POST => X:{schedule_token}@{base_url}/open_api/v1/encounters/encounter_id/ops_data.[json|xml]Available for Cases and Encounters
POST => X:{schedule_token}@{base_url}/open_api/v1/cases/case_id/billing_data.[json|xml]POST => X:{schedule_token}@{base_url}/open_api/v1/encounters/encounter_id/billing_data.[json|xml]Only Available for Cases
POST => X:{schedule_token}@{base_url}/open_api/v1/cases/case_id/demographic_and_insurance_data.[json|xml]{
"ops_data": [
{
"key": "foo",
"value": "bar",
"hidden": true,
"no_touch": false
},
{
"key": "biz",
"value": "baz",
"hidden": true,
"no_touch": false
}
]
}{
"billing_data": [
{
"key": "foo",
"value": "bar",
"hidden": true,
"no_touch": false
},
{
"key": "biz",
"value": "baz",
"hidden": true,
"no_touch": false
}
]
}{
"demographic_and_insurance_data": [
{
"key": "foo",
"value": "bar",
"hidden": true,
"no_touch": false
},
{
"key": "biz",
"value": "baz",
"hidden": true,
"no_touch": false
}
]
}<ops-data type="array">
<ops-datum>
<key>foo</key>
<value>bar</value>
<hidden type="boolean">true</hidden>
<no-touch type="boolean">false</no-touch>
</ops-datum>
<ops-datum>
<key>biz</key>
<value>baz</value>
<hidden type="boolean">true</hidden>
<no-touch type="boolean">false</no-touch>
</ops-datum>
</ops-data>| Response Code | Response Message |
|---|---|
| 201 | (message as below) |
| 401 | Unauthorized |
| 404 | Case Not Found |
| 422 | (Unprocessable Entity) |
<ops-data type="array">
<ops-datum>
<id type="integer">11863</id>
</ops-datum>
<ops-datum>
<id type="integer">11864</id>
</ops-datum>
</ops-data>{
"ops_data":
[
{
"id": 11863
},
{
"id": 11864
}
]
}<ops-data type="array">
<ops-datum>
<key>foo</key>
<value nil="true" />
<hidden type="boolean">true</hidden>
<errors>
<value type="array">
<value>can't be blank</value>
</value>
<key type="array">
<key>must be unique</key>
</key>
</errors>
</ops-datum>
<ops-datum>
<key>foo</key>
<value>bar</value>
<hidden type="boolean">true</hidden>
<errors>
<key type="array">
<key>must be unique</key>
</key>
</errors>
</ops-datum>
</ops-data>{
"ops_data":
[
{
"key": "foo",
"value": null,
"hidden": true,
"errors":
{
"value":
[
"can't be blank"
],
"key":
[
"must be unique"
]
}
},
{
"key": "foo",
"value": "baz",
"hidden": true,
"errors":
{
"key":
[
"must be unique"
]
}
}
]
}