Logica RESTful Services API

Introduction


The Logica has adopted portions of the FHIR RESTful service specification for reading, writing and searching for clinical data. Details of the FHIR RESTful services specification can be found here: http://www.hl7.org/implement/standards/fhir/http.html

RESTful API 

The following describes the RESTful services which are available for all supported FHIR resources. The basic CRUD operations (Create, Retrieve, Update, Delete) are supported as well as search. For details on supported query parameters, refer to the query capabilities links in the table above.

In the following API HTTP Commands:

  • Content surrounded by [] is mandatory, and will be replaced the string literal identified. Possible insertion values:
    • base: The service root URL (e.g. http(s)://server{/path})
    • type: The name of a resource type (e.g. "patient", "observation")
    • id: The logical id of a resource
    • parameters: URL parameters as defined for the particular operation
  • Supported mime-types: application/json+fhir, application/json
  • Content surrounded by {} is optional 

Create Resource

Details of the FHIR RESTful services specification for creating a resource can be found here: http://www.hl7.org/implement/standards/fhir/http.html#create.

HTTP POST Command

POST [base]/[type] {?_format=[mime-type]}
Sample JSON Payload
{
   "resourceType" : "Patient",
   "text" :
      {
         "status" : "generated",
         "div" : "<div><p>PT-ONE XTESTHIMSS</p></div>"
      },
   "identifier" :
      [
         {
            "use" : "usual",
            "label" : "IHC Hospital EMPI",
            "system" : "urn:oid:0.1.2.3.4.5.6.7",
            "value" : "549614826"
         }
      ],
   "name" :
      [
         {
            "use" : "official",
            "family" :
               [
                  "XTESTHIMSS"
               ],
            "given" :
               [
                  "PT-ONE"
               ]
         }
      ],
   "telecom" :
      [
         {
            "system" : "phone",
            "use" : "home"
         },
         {
            "system" : "phone",
            "use" : "mobile"
         }
      ],
   "gender" :
      {
         "coding" :
            [
               {
                  "system" : "http://hl7.org/fhir/v3/AdministrativeGender",
                  "code" : "F",
                  "display" : "Female"
               }
            ]
      },
   "birthDate" : "2010-12-16T00:00:00",
   "address" :
      [
         {
            "use" : "home"
         }
      ],
   "active" : true
}

Delete Resource

Details of the FHIR RESTful services specification for deleting a resource can be found here: http://www.hl7.org/implement/standards/fhir/http.html#delete.

HTTP DELETE Command

DELETE [base]/[type]/[id] {?_format=[mime-type]}


Update Resource

Details of the FHIR RESTful services specification for updating a resource can be found here: http://www.hl7.org/implement/standards/fhir/http.html#update.

Note: The Logica platform does not currently support creation of a resource with a client defined ID. PUT can only be used to update an existing resource.

HTTP PUT Command

PUT [base]/[type]/[id] {?_format=[mime-type]}
Sample JSON Payload
{
   "resourceType" : "Patient",
   "text" :
      {
         "status" : "generated",
         "div" : "<div><p>PT-ONE XTESTHIMSS</p></div>"
      },
   "identifier" :
      [
         {
            "use" : "usual",
            "label" : "IHC Hospital EMPI",
            "system" : "urn:oid:0.1.2.3.4.5.6.7",
            "value" : "549614826"
         }
      ],
   "name" :
      [
         {
            "use" : "official",
            "family" :
               [
                  "XTESTHIMSS"
               ],
            "given" :
               [
                  "PT-ONE"
               ]
         }
      ],
   "telecom" :
      [
         {
            "system" : "phone",
            "use" : "home"
         },
         {
            "system" : "phone",
            "use" : "mobile"
         }
      ],
   "gender" :
      {
         "coding" :
            [
               {
                  "system" : "http://hl7.org/fhir/v3/AdministrativeGender",
                  "code" : "F",
                  "display" : "Female"
               }
            ]
      },
   "birthDate" : "2010-12-16T00:00:00",
   "address" :
      [
         {
            "use" : "home"
         }
      ],
   "active" : true
}

Reading by Logical Identifier

Details of the FHIR RESTful services specification for reading a resource can be found here: http://www.hl7.org/implement/standards/fhir/http.html#read.

HTTP GET Command

GET [base]/[type]/[id] {?_format=[mime-type]}

Searching a Resource Type by Parameters

Details of the FHIR RESTful services specification for searching for a resource can be found here: http://www.hl7.org/implement/standards/fhir/http.html#search.

See individual resource documentation for more details about currently supported search parameters.

HTTP GET Command for Searching

GET [base]/[type]?[parameters] {&_format=[mime-type]}

General Query Parameters 

Details of the FHIR RESTful services specification for sorting and paging result sets can be found here: http://www.hl7.org/implement/standards/fhir/search.html#sort.

ParameterQualifiersNotes
_sortasc, desc_sort is used to sort a result set on a specified parameter. Qualifiers asc and desc indicate ascending or descending. Ex. _sort:asc=name
_countna_count is used to specify the number of results to be returned to the client. The result set will contain links to allow the client to request subsequent pages.
pagena

page is used for paging through a result set. URLs containing the page parameter are returned by the server along with result sets. The client should not create URLs containing the page parameter.