#!/bin/bash # NZ Base provides ValueSet and CodeSystem resources... for rs in ValueSet CodeSystem do for i in ../nzbase/v2.0.0/$rs-*.json do # Extract the resourceId from the filename pfx=${i#*-} rsId=${pfx%%.*} curl -X PUT http://localhost:8080/fhir/$rs/$rsId \ -H "Authorization: bearer ${ACCESS_TOKEN}" \ -H "Content-Type: application/json" \ --data @$i done done # NZ Central Region has all three plus SearchParameters for rs in ValueSet CodeSystem ConceptMap SearchParameter do for i in output/$rs-nz*.json do # Extract the resourceId from the filename pfx=${i#*-} rsId=${pfx%%.*} curl -X PUT http://localhost:8080/fhir/$rs/$rsId \ -H "Authorization: bearer ${ACCESS_TOKEN}" \ -H "Content-Type: application/json" \ --data @$i done done