Skip to content

In the initialization of tofhir-server, some structure definitions are not validated #120

@dogukan10

Description

@dogukan10

If tofhir-server has definitions-root-urls = ["http://hl7.org/fhir/"] in the application.conf file, we get the following exception:

Exception in thread "main" io.onfhir.exception.InitializationException: Some of the given infrastructure resources (http://hl7.org/fhir/StructureDefinition/clinicaldocument,http://hl7.org/fhir/StructureDefinition/Composition,http://hl7.org/fhir/StructureDefinition/catalog) of type StructureDefinition does not conform to base FHIR specification! http://hl7.org/fhir/StructureDefinition/clinicaldocument :: JObject(List((severity,JString(error)), (code,JString(invalid)), (diagnostics,JString(Invalid value 'http://terminology.hl7.org/ValueSet/v3-ConfidentialityClassification|2014-03-26' for FHIR primitive type 'canonical'!)), (expression,JArray(List(JString(snapshot.element[19].binding.valueSet)))))),JObject(List((severity,JString(warning)), (code,JString(invalid)), (diagnostics,JString(Constraint 'sdf-0' is not satisfied for the given value! Constraint Description: 'Name should be usable as an identifier for the module by machine processing applications such as code generation'. FHIR Path expression: 'name.matches('[A-Z]([A-Za-z0-9_]){0,254}')')), (expression,JArray(List(JString($this))))))
http://hl7.org/fhir/StructureDefinition/Composition :: JObject(List((severity,JString(error)), (code,JString(invalid)), (diagnostics,JString(Invalid value 'http://terminology.hl7.org/ValueSet/v3-ConfidentialityClassification|2014-03-26' for FHIR primitive type 'canonical'!)), (expression,JArray(List(JString(snapshot.element[18].binding.valueSet)))))),JObject(List((severity,JString(error)), (code,JString(invalid)), (diagnostics,JString(Invalid value 'http://terminology.hl7.org/ValueSet/v3-ConfidentialityClassification|2014-03-26' for FHIR primitive type 'canonical'!)), (expression,JArray(List(JString(differential.element[10].binding.valueSet))))))
http://hl7.org/fhir/StructureDefinition/catalog :: JObject(List((severity,JString(error)), (code,JString(invalid)), (diagnostics,JString(Invalid value 'http://terminology.hl7.org/ValueSet/v3-ConfidentialityClassification|2014-03-26' for FHIR primitive type 'canonical'!)), (expression,JArray(List(JString(snapshot.element[19].binding.valueSet)))))),JObject(List((severity,JString(warning)), (code,JString(invalid)), (diagnostics,JString(Constraint 'sdf-0' is not satisfied for the given value! Constraint Description: 'Name should be usable as an identifier for the module by machine processing applications such as code generation'. FHIR Path expression: 'name.matches('[A-Z]([A-Za-z0-9_]){0,254}')')), (expression,JArray(List(JString($this))))))
	at io.onfhir.config.BaseFhirConfigurator.validateGivenInfrastructureResources(BaseFhirConfigurator.scala:190)
	at io.onfhir.config.BaseFhirConfigurator.initializePlatform(BaseFhirConfigurator.scala:85)
	at io.tofhir.server.service.FhirDefinitionsService.<init>(FhirDefinitionsService.scala:55)
	at io.tofhir.server.endpoint.FhirDefinitionsEndpoint.<init>(FhirDefinitionsEndpoint.scala:16)
	at io.tofhir.server.endpoint.ToFhirServerEndpoint.<init>(ToFhirServerEndpoint.scala:36)
	at io.tofhir.server.ToFhirServer$.start(ToFhirServer.scala:15)
	at io.tofhir.server.Boot$.delayedEndpoint$io$tofhir$server$Boot$1(Boot.scala:4)
	at io.tofhir.server.Boot$delayedInit$body.apply(Boot.scala:3)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions