onaio / fhir-tooling

A command line utility to support FHIR Core content authoring
Other
1 stars 1 forks source link

EUSM - Assign inventories to location #161

Closed Wambere closed 4 weeks ago

Wambere commented 4 months ago

Linked to https://github.com/onaio/fhir-tooling/issues/157

This issue tracks the assigning of inventories to locations

@dubdabasoduba is there an endpoint for this?

Wambere commented 4 months ago

json payload

{
  "resourceType": "List",
  "id": "$id",
  "status": "$status",
  "title": "$title",
  "code": {
    "coding": [
      {
        "system" : "http://smartregister.org/codes",
        "code"   : "22138876",
        "display": "Supply Inventory List"
      }
    ],
    "text": "Supply Inventory List"
  },
  "subject": {"reference": "Location/$location_id"},
  "entry": [
    {
      "flag": {
        "coding": [
          {
            "system" : "http://smartregister.org/codes",
            "code"   : "22138876"                 ,
            "display": "Supply Inventory List"
          }
        ],
        "text": "Supply Inventory List"
      },
      "date": "$supply_date",
      "item": {"reference": "Group/$inventory_id"}
    }
  ]
}
Wambere commented 4 months ago

Potential csv below Mapping to the json payload in the comment above

Column Source
id input or generated
status ??
title ??
location_id ??
inventories array [ supply_date:inventory_id ] ??

@dubdabasoduba @ageryck @AnnieMungai