Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FHIR Road Map]: Add the Administrative level for each Location created on OpenSRP web #1349

Closed
8 tasks
dubdabasoduba opened this issue Mar 13, 2024 · 2 comments · Fixed by #1360
Closed
8 tasks
Assignees
Milestone

Comments

@dubdabasoduba
Copy link
Member

Issue Context?

  • OpenSRP web creates locations in a hierarchy perspective i.e. locations have parent and children nodes. It's somewhat complicated to fetch the locations at a certain level without having to build the location hierarchy and then traverse it.
  • We would like to introduce the concept of an administrative level for each location in the hierarchy.
  • The Root location would always have level 0 then all the children would have level parent_level + 1

Issue Implemetation details?

  • Add an administrative level for every location resource created on OpenSRP web. If a location does not have a parent selected then the administrative level will be 0. All the children in the hierarchy will have an administrative level of parent_level + 1
  • This level is to be added to the type property of the Location resource.
  • The CodeSystems to be used should have the following properties
  • Display the Administrative level on the view details page

Issue Acceptance criteria?

  • All Locations created by OpenSRP web should automatically have an administrative level added to them.

FHIR resources to be used?

No response

Relevant Information

Sample Codes

[
  {
    "system" : "https://smartregister.org/codes/administrative-level",
    "code"   : "0"                                                   ,
    "display": "Level 0"
  },
  {
    "system" : "https://smartregister.org/codes/administrative-level",
    "code"   : "1"                                                   ,
    "display": "Level 1"
  }
]
@ciremusyoka
Copy link
Collaborator

Here is a sample of payload with type and administrative level included

{
    "resourceType": "Location",
    "status": "active",
    "name": "Test location",
    "partOf": {
        "reference": "Location/138396",
        "display": "World"
    },
    "identifier": [
        {
            "use": "official",
            "value": "c71eeae5-ba17-4083-9626-81b62a18680b"
        }
    ],
    "physicalType": {
        "coding": [
            {
                "system": "http://terminology.hl7.org/CodeSystem/location-physical-type",
                "code": "jdn",
                "display": "Jurisdiction"
            }
        ]
    },
    "type": [
        {
            "coding": [
                {
                    "system": "https://smartregister.org/codes/administrative-level",
                    "code": "1",
                    "display": "Level 1"
                }
            ]
        }
    ],
    "id": "fe85f1b3-8ce3-40b0-9fdf-89e97d5f246a"
}

@peterMuriuki
Copy link
Collaborator

peterMuriuki commented Apr 3, 2024

For consistency patterns I think we should set the system url to http://smartregister.org/CodeSystem/administrative-level. As it currently is for service point types, of-course it is something we can always review and change later. cc @dubdabasoduba @ciremusyoka

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging a pull request may close this issue.

3 participants