C# Libraries for Canonical APIs

Is anyone aware of C# libraries for any openEHR APIs? We’re very .NET in Wales and part of this has revealed an inability to integrate with any native JSON structures. At present API payloads are being turned into C# objects and there’s a lot of engineering involved.

FYI EHRBase/OpenEHR implementation in .Net

Thanks - I am not sure it helps. I wonder what the best .net / c# dev approach is?

I have a C# version of the AM/RM/OPT classes on my to-do list for a long time. Today I was contacted by a company that is planning to use C# for their work on openEHR. Maybe this is a chance to finally add C# to my generators :thinking:

1 Like

In the past I’ve spent more time explaining how “easy” it is to add a C# generator than it took me to write one :blush:

Here are the C# classes for RM 1.0.3 (rename the extension .md to .zip):

openehr_csharp_models_rm103.md (210.9 KB)

@johnmeredith @DanielBaumert Would something like this be useful for your .NET / C# implementation?

There is only one serious error for DV_INTERVAL class but maybe somebody who uses C# might help me figure it out.

I would need to add serialization/deserialization but have to learn how it is done in C# – it looks “easier” than in Java :thinking:
EDIT: done (file above updated with the new version)

After generators for Dart, Java and C#, should I add one for Kotlin too? Or TypeScript?
EDIT: TypeScript

2 Likes

The above file is updated with:

  • JSON serialization annotations
  • auto-implemented properties instead of getters/setters
  • other changes to follow C# conventions