Uploaded image for project: 'Webservices REST Module'
  1. Webservices REST Module
  2. RESTWS-468

Support referring to concepts by SAME-AS mapping

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: TBD
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.9
    • Labels:
    • Complexity:
      Undetermined
    • Sprint:
      Sprint 1

      Description

      This is annoying:

      POST .../obs { "concept": "5089AAAAAAAAAAAAAAAAAAAAAAAAAAAA" }
      

      This is nicer:

      POST .../obs { "concept": "CIEL:5089" }
      

      We should support referring to a concept by a reference term mapping. This should only support the case where there is a SAME-AS mapping to one reference term.

      • A request should fail if it refers to a concept by a mapping whose type is not SAME-AS. (Probably returning null in code will have the right behavior.)
      • A request should fail if it gives a reference term that has >1 concept mapped to it as SAME-AS. (This should throw an exception rather than return an arbitrary value.)

      This should be implemented in org.openmrs.module.webservices.rest.web.v1_0.resource.openmrs1_9.ConceptResource1_9 by overriding the getByUniqueId(String) method. This behavior should not be supported in OpenMRS 1.8 (since we hadn't revised the concept model to have map types yet), but only in 1.9+.

        Attachments

          Activity

            People

            Assignee:
            lluismf Lluis Martinez
            Reporter:
            darius Darius Jazayeri
            Designated Committer:
            Rafal Korytkowski
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: