def callback(channel, method, properties, body): body = body.decode("utf-8") jsonBody = json.loads(body) response = Utilities.createFHIRResource( jsonBody['resource'], body) # Because we may have repeat IDs for subscriptions and practitioners as a part of a simulation. if (response == 200 or (response == 400 and ((jsonBody['resource'] == "Subscription" or jsonBody['resource'] == "Practitioner")))): channel.basic_ack(method.delivery_tag) else: print("Error adding FHIR resource: " + str(response))
async def post(self, request): return Response( "", Utilities.createFHIRResource("Condition", await request.body()), {}, "")
async def post(self, request): return Response( "", Utilities.createFHIRResource("MedicationDispense", await request.body()), {}, "")