Stream: implementers
Topic: issues caused by the DataFormatException
systemcia (May 19 2018 at 08:21):
dear all:
recently i have tried to use fhir to make my own Custom Structures contains the resource, the datatype and the provider,i have tested that it's ok to construct the xml , but i occur the issue when i tried to save the xml to the database using the client:fhirClient.create().resource(myCustomRes).execute()
i got the error:
Caused by: ca.uhn.fhir.parser.DataFormatException: television has type ca.uhn.fhir.spring.boot.autoconfigure.entity.CustomDatatype but this is not a valid type for this element - Expected one of: [class org.hl7.fhir.dstu3.model.Annotation, class org.hl7.fhir.dstu3.model.UriType, class org.hl7.fhir.dstu3.model.DateType, class org.hl7.fhir.dstu3.model.SampledData, class org.hl7.fhir.dstu3.model.Identifier, class org.hl7.fhir.dstu3.model.UsageContext, class org.hl7.fhir.dstu3.model.PositiveIntType, class org.hl7.fhir.dstu3.model.DecimalType, class org.hl7.fhir.dstu3.model.IntegerType, class org.hl7.fhir.dstu3.model.Timing, class org.hl7.fhir.dstu3.model.Base64BinaryType, class org.hl7.fhir.dstu3.model.Attachment, class org.hl7.fhir.dstu3.model.RelatedArtifact, class org.hl7.fhir.dstu3.model.BooleanType, class org.hl7.fhir.dstu3.model.Address, class org.hl7.fhir.dstu3.model.ContactPoint, class org.hl7.fhir.dstu3.model.Period, class org.hl7.fhir.dstu3.model.Signature, class org.hl7.fhir.dstu3.model.ContactDetail, class org.hl7.fhir.dstu3.model.ElementDefinition, class org.hl7.fhir.dstu3.model.Age, class org.hl7.fhir.dstu3.model.DateTimeType, class org.hl7.fhir.dstu3.model.Ratio, class org.hl7.fhir.dstu3.model.Narrative, class org.hl7.fhir.dstu3.model.UnsignedIntType, class org.hl7.fhir.dstu3.model.Dosage, class org.hl7.fhir.dstu3.model.Extension, class org.hl7.fhir.dstu3.model.Coding, class org.hl7.fhir.dstu3.model.IdType, class org.hl7.fhir.dstu3.model.Distance, class org.hl7.fhir.dstu3.model.TimeType, class org.hl7.fhir.dstu3.model.Meta, class org.hl7.fhir.dstu3.model.Duration, class org.hl7.fhir.dstu3.model.DataRequirement, class org.hl7.fhir.dstu3.model.HumanName, class org.hl7.fhir.dstu3.model.StringType, class org.hl7.fhir.dstu3.model.Contributor, class org.hl7.fhir.dstu3.model.CodeableConcept, class org.hl7.fhir.dstu3.model.TriggerDefinition, class org.hl7.fhir.utilities.xhtml.XhtmlNode, class org.hl7.fhir.dstu3.model.SimpleQuantity, class org.hl7.fhir.dstu3.model.ParameterDefinition, class org.hl7.fhir.dstu3.model.CodeType, class org.hl7.fhir.dstu3.model.Range, class org.hl7.fhir.dstu3.model.Count, class org.hl7.fhir.dstu3.model.InstantType, class org.hl7.fhir.dstu3.model.MarkdownType, class org.hl7.fhir.dstu3.model.OidType, class org.hl7.fhir.dstu3.model.Money, class org.hl7.fhir.dstu3.model.Reference, class org.hl7.fhir.dstu3.model.Quantity]
Could any one give me a support for how to make fhir server recognize and save my custom datatype and resource?
thank you very much!
systemcia (May 19 2018 at 08:25):
@Grahame Grieve dear Grahame , could you help me?
Grahame Grieve (May 20 2018 at 13:21):
not sure. I looked at this and it didn't look like anything to do with me
Lloyd McKenzie (May 20 2018 at 13:33):
@James Agnew ?
Brian Postlethwaite (May 20 2018 at 14:05):
Maybe ask on the hapi stream?
James Agnew (May 20 2018 at 15:42):
Following up on the Google Group stream about the same issue: https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/hapi-fhir/DGpLF8M6ijE/6QC8R8a4BQAJ
systemcia (May 21 2018 at 09:23):
ok , james , have replied.
Last updated: Apr 12 2022 at 19:14 UTC