You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a developer using Aidbox .NET SDK, I want to have C# objects for date and datetime representations so that I can format dates and datetimes to strings without prior conversion.
For example, field Patient.BirthDate can be DateOnly object
The text was updated successfully, but these errors were encountered:
The problem here is that here is no direct correspondence between FHIR and C# types. In FHIR date type can be represented as year ("2000"), year month ("2000-01") or date.
So there are options of how to implement date and dateTime types conversion FHIR <=> C#
Option 1
Do not convert date and dateTimes. Use strings for dates
Option 2
Convert FHIR date and dateTime to C# DateTime object.
On read from FHIR database into C# we can use custom json serializers to convert year or year month to DateTime.
On write to FHIR database from C# we can force writing it as full date
Option 3
Provide a client option which will enable/disable date and dateTime serialization
Option 4
Use FHIR wrapper types for Date and DateTime instead of C# native types
krvital
changed the title
Use appropriate classes for date and datetime representation
Proper C# classes for representation FHIR's date and datetime
May 3, 2024
As a developer using Aidbox .NET SDK, I want to have C# objects for date and datetime representations so that I can format dates and datetimes to strings without prior conversion.
For example, field Patient.BirthDate can be
DateOnly
objectThe text was updated successfully, but these errors were encountered: