Ahryman40k / typescript-fhir-types

Typescript / Javascript object model for FHIR standard
MIT License
126 stars 27 forks source link

Object creation #39

Closed jon-coffey closed 2 years ago

jon-coffey commented 2 years ago

Hi

Is it somehow possible to generate a "prefilled" object with mandatory fields and fixed literals?

We use Profiles (TS interfaces) based on io-ts with e.g. already fixed meta information from external. We now don't want to recreate all the information in the interfaces again.

As far as I understand this is taking json objects and validates them.

Thanks for feedback

Ahryman40k commented 2 years ago

Indeed, the goal here is validate a payload to check if we receive a valid payload object. One of the missing functionality is that this check is done against the FHIR standard and not your own standard, meaning you could have a stricter way to validate objects.

I'm not really sure about what you ask here, but as far as I understand, because your interfaces has some kind of contant values, you expect that instantiated objects inherit from that constraints ?

Ahryman40k commented 2 years ago

No activity, I close.