ehn-dcc-development / eu-dcc-schema

Schema for the ehn DCC payload
Apache License 2.0
164 stars 59 forks source link

Schema Relationships Not Defined/Supported #98

Closed psavva closed 3 years ago

psavva commented 3 years ago

Dear @gabywh

We are facing an issue where it's not possible with the current definition of the ValueSets to define the relationships between Product/Manufacturer.

This makes it impossible to validate, and enforce the correct inputs as these relationships do not exist in the Schema.

Can the value sets be enhanced to represent the relationships, as to make it more useful for data inputs and validation?

Panayiotis Savva University of Cyprus eHealth Lab (EU DCC Workgroup) Country: Cyprus

gabywh commented 3 years ago

Valuesets are as defined / given by the Semantic Sub-Group, who take their input from authoritative sources (e.g. EU JRC). So the valuesets stay as they are.

Valdiation: I suspect what you mean is that you cannot use JSON Schema validation (e.g. ajv) at this point to check? That's correct.

  1. valuesets as given
  2. valueset datatypes loosely coupled in JSONSchema (e.g. string and not enum, which was an option explored early on and was discarded) specifically to allow for updating valuesets independent of the JSON Schema see e.g. https://github.com/ehn-dcc-development/ehn-dcc-schema/wiki/FAQ#will-there-be-one-official-api-endpoint-to-get-updated-valueset-data
  3. in order to allow flexibility and extensibility in the business rules (in the end determined by a Member State) the large majority of your validation should be happening in the business rules, not in the JSON Schema directly. There is a little validation in the DCC Schema just to allow basic structure checking and some very clearly specified constraints like date. See also: https://github.com/ehn-dcc-development/ehn-dcc-schema/wiki/FAQ#what-do-the-typical-processing-stages-look-like-for
SchulzeStTSI commented 3 years ago

@gabywh The question of @psavva goes in the direction, how the relationship between valuesets can be covered. Means which manufacturer provides which vaccines. This can be maybe covered by a new valueset list. For instance

{
"valueSetId": "ORG-100001699",
"valueSetDate": "2021-04-27",
"valueSetValues": { "Vaccine1": ...} }

The question is how can this kind of list be created?

ggrund-tsi commented 3 years ago

Hi @gabywh, @psavva, @SchulzeStTSI,

I would like suggest to look at the upside down case. --> bring the manufacturer ID in the medical product value set. (1-n relation) So the issuance frontend is able to set the manufacturer automatically without user interaction. Maybe as a kind of user friendlyness. --> one step and one error case less.

Best regards, Gordon

psavva commented 3 years ago

@ggrund-tsi This is an excellent suggestion.

@gabywh how can we have this issue with the lack of relationships resolved promptly?

It's impacting both usability and data quality.

Best Regards Panayiotis Savva

gabywh commented 3 years ago

Well as I said above in my (1) - the valuesets we have are as defined and as given. A lot of consideration has gone into their contents and construction by a separate group, who then supply us with the results of their considerations. The most I can do is further the request to that group, but it is certainly completely out of any remit here for us to start changing them.

psavva commented 3 years ago

Well as I said above in my (1) - the valuesets we have are as defined and as given. A lot of consideration has gone into their contents and construction by a separate group, who then supply us with the results of their considerations. The most I can do is further the request to that group, but it is certainly completely out of any remit here for us to start changing them.

Hi @gabywh ,

I am really not requesting to change the value sets that are currently there, however, you must think of introducing some relationship valueset, in order to keep backwards compatibility, and introduce the missing relationships.

Please can you advise how we can take this further, and have a review on this request with the above mentioned "separate group", as there is an oversight on creating these relationships.

Best Regards Panayiotis Savva

gabywh commented 3 years ago

@psavva already raised - they're the ones who generate/modify any valuesets

psavva commented 3 years ago

@psavva already raised - they're the ones who generate/modify any valuesets

Thank you so much :)

Best Regards Panayiotis Savva

gabywh commented 3 years ago

@psavva I'm assuming now resolved to your satisfaction? Will close.