Closed Wambere closed 3 months ago
FHIR version
{
"resourceType": "Location",
"id": "103ddb58-f359-4820-aaaa-459ba539913f",
"identifier": [
{"use": "official", "value": "103ddb58-f359-4820-aaaa-459ba539913f"}
],
"type": {
"coding": [
{
"system" : "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"code" : "??" ,
"display": "??"
}
]
},
"status": "active",
"name": "CSB Ankazomena",
"alias": [??],
"description": "??",
"physicalType": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/location-physical-type",
"code": "??",
"display": "??"
}
]
},
"partOf": {"reference": "Location/5e8d93a2-47f2-4310-8cd3-069a34599b4e"},
"position": {"longitude": 47.9, "latitude": -14.844}
}
@dubdabasoduba please assist in filling in the above
Mapping to current location csv json payload this maps to for context
Column | Source |
---|---|
name | properties -> name |
status | properties -> status |
method | "create" |
id | id |
parentName | ?? |
parentID | properties -> parentId |
type | "Service point" |
typeCode | ?? |
physicalType | ?? |
physicalTypeCode | ?? |
* longitude | geometry -> coordinates -> [0] |
* latitude | geometry -> coordinates -> [1] |
To add geometry to json payload
"position": {"longitude": {{ longitude }}, "latitude": {{ latitude }}}
cc @dubdabasoduba @ageryck @AnnieMungai
@ageryck this is ready to test, the geometry has been added
SELECT DISTINCT json->'properties'->>'name' as name, json->'properties'->>'status' as status,'udpate' as method,json->>'id' as id,
(select name from core.location_metadata where geojson_id= json->'properties'->>'parentId') as parentName, json->'properties'->>'parentId' as parentId,
json->'properties'->>'type' as Type, 'svp' as TypeCode, null as physicalType, null as physicalTypeCode, json->'geometry'->'coordinates'->0 as longitude
, json->'geometry'->'coordinates'->1 as latitude
from core.structure
@dubdabasoduba below are the distinct service points in the DB how do we code them for value TypeCode
;
"Village"
"CSB 2"
"Site Communautaire"
"Mairie"
"DRSP"
"CEG"
"Water Point"
"Warehouse"
"CHRD 2"
"CHRR"
"CSB 1"
"Presco"
"MEN"
"EPP"
"DRENETP"
"CHRD 1"
"Ecole privé"
tested ok needs to agree on supported location types
Current service point structure from opensrp 1.0
Form https://example.smartregister.org/opensrp/rest/location/getAll?includeInactive=true&is_jurisdiction=false&limit=10&return_geometry=true&serverVersion=100