hl7-fhirhapi-fhirsmart-on-fhirfhir-net-api

Hl7.Fhir.ElementModel.StructuralTypeException: Type checking the data: Encountered unknown element 'timestamp' at location 'Bundle.timestamp[0]


I am quite new in FHIR development. f I try to do the same thing with the other public test server (https://server.fire.ly) This is my code getting below exception. Hl7.Fhir.ElementModel.StructuralTypeException: Type checking the data: Encountered unknown element 'timestamp' at location 'Bundle.timestamp[0]' while parsing\r\nAre you connected to a FHIR server with FHIR version 3.0.2? Try the FhirClientSetting.VerifyFhirVersion to ensure that you are connected to a FHIR server with the correct FHIR version.\r\n

APICall:await_fhirClient.GetAsync("Patient/f741e0731c6e429f9600e409a5993bb3/Appointment");


Solution

  • The public Firely server uses FHIR version 4.0.1 by default at this moment. If you change to https://server.fire.ly/R3 you will reach the endpoint using FHIR 3.0.2, which seems to be the version you use in your implementation. Another option is to configure the FhirClient to include the FHIR version in its request headers, for example with the UseFhirVersionInAcceptHeader setting.