简体   繁体   中英

Error when creating an FHIR resource in google cloud healthcare API (Ruby)

I'm trying to create a Patient type resource using the service

  • healthcare = Google::Apis::HealthcareV1
  • service = healthcare::CloudHealthcareService.new

and create_project_location_dataset_fhir_store_fhir method in ruby. I keep on getting this error missing required field: resourceType

more details on the function im using: https://googleapis.dev/ruby/google-api-client/latest/Google/Apis/HealthcareV1/CloudHealthcareService.html#create_project_location_dataset_fhir_store_fhir-instance_method

if anyone has come across this and knows how to fix it

this is how i create my request body:

  • http_body_object = Google::Apis::HealthcareV1::HttpBody.new
  • http_body_object.content_type = "application/fhir+json"
  • http_body_object.data = json_encoded
  • http_body_object.extensions = extensions

The body could be missing the proper resourceType: Patient as you can find at this link - hl7.org/fhir/patient-example.json.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM