Error when creating an FHIR resource in google cloud healthcare API (Ruby)
iam-aman opened this issue · 1 comments
iam-aman commented
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:
test_obj = {
name: [{use: 'official', family: 'Test', given: ['User']}],
gender: 'female',
birthDate: '1967-08-09',
resourceType: 'Patient'
}
http_body_object = Google::Apis::HealthcareV1::HttpBody.new
http_body_object.content_type = "application/fhir+json"
http_body_object.data = test_obj
http_body_object.extensions = []
i use gem 'google-api-client'
bajajneha27 commented
Can you please also send us the code you're using to call the method?