Skip to content
This repository has been archived by the owner on Aug 11, 2021. It is now read-only.

zmapping

Jonathan Payne edited this page Feb 25, 2015 · 3 revisions

Overview

The API exposes a representation of a mapping resource to represent a relationship between 2 concepts. The relationship type is defined by the mapType attribute. Relationships are uni-directional from the fromConcept to the toConcpet, even if the inverse mapping is equivalent (e.g. "Same As" relationship). toConcept must be a concept within an OCL source.

While the fromConcept may refer to a concept stored in OCL or to an external code, the definition for the source must be defined in OCL. If the fromConcept refers to a concept in OCL, it is referenced using the fromConceptUrl field. If the fromConcept refers to an external concept, it is referenced using the toSourceUrl, toConceptCode, and toConceptName fields.

Versioning of mappings

mappings are attributes of the toConcept, therefore when a mapping is added, modified, or removed, a new version of the toConcept is created.

Considerations

Get a single mapping

  • Get mapping using an authenticated user
GET /user/:dictionaryType/:dictionary/concepts/:concept/mappings/:mapping
  • Get a mapping using a public dictionary
GET /:ownerType/:owner/:dictionaryType/:dictionary/concepts/:concept/mappings/:mapping

Response

  • Status: 200 OK
{
    "type": "Mapping",
    "uuid": "8d492ee0-c2cc-11de-8d13-0010c6dffd0f",

    "mapType": "Same As",

    "fromSourceOnwer": "Regenstrief",
    "fromSourceName": "LOINC",
    "fromConceptCode": "32700-7",
    "fromSourceUrl": "/orgs/Regenstrief/sources/LOINC",
    "fromConceptUrl": "/orgs/Regenstrief/sources/LOINC/concepts/32700-7",

    "toSourceOnwer": "WHO",
    "toSourceName": "ICPC-2",
    "toConceptCode": "A73",
    "toConceptName": "Malaria",
    "toSourceUrl": "/orgs/WHO/sources/ICPC-2",

    "url": "//mappings/8d492ee0-c2cc-11de-8d13-0010c6dffd0f",

    "createdOn": "2008-01-14T04:33:35Z",
    "updatedOn": "2008-02-18T09:10:16Z"
} 

List mappings or inverse mappings for a concept

  • List mappings for a concept
GET /user/:dictionaryType/:dictionary/concepts/:concept/mappings
GET /:ownerType/:owner/:dictionaryType/:dictionary/concepts/:concept/mappings
  • Parameters
    • includeInverseMappings (optional) - 0 or 1; default is 0

Response

  • Status: 200 OK
[
    {
        "mapType": "Same As",
        "fromConceptUrl": "/orgs/Regenstrief/sources/LOINC/concepts/32700-7",
        "toConceptUrl": "/orgs/WHO/sources/ICPC-2/concepts/A73",
        "url": "/orgs/Regenstrief/sources/LOINC/concepts/32700-7/mappings/8d492ee0-c2cc-11de-8d13-0010c6dffd0f",
    },
    {
        "mapType": "Narrower Than",
        "fromConceptUrl": "/orgs/Regenstrief/sources/LOINC/concepts/32700-7",
        "toSourceCode": "A73",
        "toSourceName": "Malaria",
        "toSourceUrl": "/orgs/WHO/sources/ICPC-2",
        "url": "/orgs/Regenstrief/sources/LOINC/concepts/32700-7/def3fe-c2cc-11de-8d13-asdf9393930",
    },
    {
        "mapType": "Same As",
        "toConceptUrl": "/orgs/Regenstrief/sources/LOINC/concepts/32700-7",
        "fromConceptUrl": "/orgs/WHO/sources/ICPC-2/concepts/A73",
        "url": "/orgs/Regenstrief/sources/LOINC/concepts/32700-7/mappings/8d492ee0-c2cc-11de-8d13-0010c6dffdea",
    }
]

List mappings across concepts and sources

  • List mappings across all concepts and sources
GET /mappings
  • Parameters
    • q (optional) string - ??
    • maptype (optional) string - mapType descriptor
    • includeInverseMappings (optional) - 0 or 1; default is 0
    • Sources
      • source (optional) string - comma-separated list of shorthand sources (e.g. IHTSDO:SNOMED-CT) for the "from" or "to" source
      • fromSource (optional) string - comma-separated list of sources in shorthand for the "from" source
      • toSource (optional) string - comma-separated list of sources in shorthand for the "to" source
    • Concepts
      • concept (optional) string - comma-separated list of concepts in shorthand for the "from" or "to" concept
      • fromConcept (optional) string - comma-separated list of concepts in shorthand for the "from" concept
      • toConcept (optional) string - comma-separated list of concepts in shorthand for the "to" concept

Response

  • Status: 200 OK
[
    {
        "mapType": "Same As",
        "fromConceptUrl": "/orgs/Regenstrief/sources/LOINC/concepts/32700-7",
        "toConceptUrl": "/orgs/WHO/sources/ICPC-2/concepts/A73",
        "url": "/orgs/Regenstrief/sources/LOINC/concepts/32700-7/mappings/8d492ee0-c2cc-11de-8d13-0010c6dffd0f",
    }
]

Notes on RELMA mappings

An example mapping request for LOINC to a local laboratory system would contain:

  • Lab’s unique order/result code that will be used for mapping
  • Orderable test/result name
  • Orderable test/result long description
  • An indicator if the test is for an order, a result or both
  • Panel indicator
  • Specimen type/source
  • Unit of measure
  • Test method
  • Result data type (numeric, alpha, alphanumeric)

OCL is able to the additional fields in the mapping, however, there is no built-in support for these.

Clone this wiki locally