Skip to content

Patient Id is not accepting string expecting type object #114

@Sairam-amaragani

Description

@Sairam-amaragani

I am trying to send FHIR patient example as request to a grpc server. I generated typescript files using proto files.
When I send below FHIR patient example as request , I am getting following error
{ code: 13, details: '.google.fhir.r4.core.Id: object expected', metadata: Metadata { internalRepr: Map(2) { 'content-type' => [Array], 'date' => [Array] }, options: {} }, progress: 'PROCESSED' }

Is the example I am sending is in the right format. If not what is the expected format can you provide any example?

FHIR Patient example

        resourceType: "Patient",
        id: "27343",
        name: [
          {
            use: "official",
            family: "Pataskii",
            given: ["Pata", ""],
            text: "Pata Pataskii",
          },
        ],
        communication: [
          {
            language: {
              coding: [
                {
                  system: "http://hl7.org/fhir/ValueSet/all-languages",
                },
              ],
            },
          },
        ],
        address: [
          {
            line: ["Test", ""],
            city: "TEST CITY",
            state: "CA",
            postalCode: "78987",
            country: "US",
          },
        ],
        birthDate: "2009-08-09",
        gender: "Male",
        maritalStatus: {
          coding: [
            {
              system: "http://terminology.hl7.org/CodeSystem/v3-MaritalStatus",
              code: "S",
              display: "Never Married",
            },
          ],
        },
        generalPractitioner: [
          {
            reference: "Practitioner/117",
          },
        ],
        contact: [
          {
            name: {},
            relationship: [
              {
                coding: [
                  {
                    system:
                      "http://terminology.hl7.org/3.1.0/CodeSystem-v2-0131.html",
                    code: "EP",
                  },
                ],
              },
            ],
            telecom: [
              {
                system: "phone",
                use: "home",
              },
              {
                system: "phone",
                use: "mobile",
              },
            ],
            extension: [],
          },
        ],
        extension: [],
        identifier: [
          {
            type: {
              text: "ssn",
              coding: [
                {
                  system: "http://terminology.hl7.org/CodeSystem/v2-0203",
                  code: "SS",
                },
              ],
            },
            system: "http://hl7.org/fhir/sid/us-ssn",
            value: "",
          },
          {
            type: {
              text: "drivers license",
              coding: [
                {
                  system: "http://terminology.hl7.org/CodeSystem/v2-0203",
                  code: "DL",
                },
              ],
            },
            period: {},
            use: "official",
            assigner: {},
          },
        ],
        telecom: [
          {
            system: "phone",
            value: "8765434560",
            use: "home",
          },
          {
            system: "phone",
            value: "8765678767",
            use: "work",
          },
          {
            extension: [],
            system: "phone",
            value: "8765434567",
            use: "mobile",
          },
          {
            extension: [],
            system: "email",
            value: "[email protected]",
          },
        ],
        contained: [],
      }


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions