record_insert ()
Function prototype | record_insert (session, task, record) |
---|---|
API Version | All |
SOAP, REST (From API Version 2.7.26) |
NOTE: In API versions before 2.7.26, the information passed in the parameter record as a XML had a different format. See Before 2.7.26
Description
Modifies information about a Medical Record
Function parameters
Input parameters: |
|
Output parameters: |
|
Request example
The record parameter can be provided either as a XML or a JSON string (JSON is only supported since API Version 2.7.26)
Example request using XML
<record>
<ref></ref>
<date>2014-09-22</date>
<visibility>all</visibility>
<tags>
<tag>
<category>DIAGNOSIS.MDC</category>
<code>4</code>
</tag>
<tag>
<category>#RECORD.TYPE</category>
<code>LAB_TEST</code>
</tag>
</tags>
</record>
Example request using JSON
{
"date": "2014-09-22",
"visibility": "all",
"tags": {
"tag": {
"category": "DIAGNOSIS.MDC",
"code": 4
}
"tag": {
"category": "#RECORD.TYPE",
"code": "LAB_TEST"
}
}
}
Return Error codes
ERROR CODE |
|
---|---|
INVALID_TOKEN | The session token provided is not valid |
TASK.NOT_FOUND | The reference of the TASK was not found |
Versions before 2.7.26
In previous versions, the record parameter only accepted XML string, and with a different format.
List of changes:
Before 2.7.26 | From 2.7.26 | Description |
---|---|---|
<tag>
<tagId>RECORD.TYPE</tagId>
<valueId>LATEST</valueId>
</tag>
| <tag>
<category>DIAGNOSIS.MDC</category>
<code>4</code>
<name>Anatomic system</name>
<value>Respiratory</value>
</tag> | The subnodes
|
| <visibility>
| New node added only accepted from API Version 2.7.26 |
Parameter example of versions before 2.7.26:
<record>
<ref>12828317</ref>
<date>2014-09-22</date>
<tags>
<tag>
<tagId>DIAGNOSIS.MDC</tagId>
<valueId>RESP</valueId>
</tag>
<tag>
<tagId>RECORD.TYPE</tagId>
<valueId>LATEST</valueId>
</tag>
</tags>
</record>