Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patient Id is not accepting string expecting type object #114

Open
Sairam-amaragani opened this issue Jan 11, 2023 · 0 comments
Open

Patient Id is not accepting string expecting type object #114

Sairam-amaragani opened this issue Jan 11, 2023 · 0 comments

Comments

@Sairam-amaragani
Copy link

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: [],
      }


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant