FHIR Chat · (no topic) · dotnet

Stream: dotnet

Topic: (no topic)


view this post on Zulip Brian Postlethwaite (Mar 14 2016 at 11:10):

I can confirm that yes we will be releasing a dev version of the dotnet client for that connectathon yes.

view this post on Zulip Brian Postlethwaite (Mar 14 2016 at 11:11):

Michael, not sure what you want it to do with rdf/turtle.

view this post on Zulip Peter Jordan (Mar 30 2016 at 21:39):

Any chance that the summary parameter that's passed to the FhirSerializer.SerializeResourceTo... methods might be re-factored to accept all of the _summary parameter values in the spec (true, text, data, count & false)?

view this post on Zulip Ewout Kramer (Mar 31 2016 at 12:18):

I am pretty sure @Brian Postlethwaite has done work on that, but I don't think it has made it into the NuGet packages yet. If we've fixed it, it will be part of our Montreal release of the .NET API.

view this post on Zulip Brian Postlethwaite (Mar 31 2016 at 21:54):

Yes, this has definitely been done, and there are unit tests that verify it too.

view this post on Zulip Brian Postlethwaite (Mar 31 2016 at 21:55):

Thought it was in the last version of the NuGet package. (The functionality is in the sqlonfhir server) Maybe its in the code committed after the last deploy. (is a breaking change as need to change from bool to the enum type)
Anyway, it is in the May package as ran the unit tests on it overnight.

view this post on Zulip Ewout Kramer (Apr 04 2016 at 07:53):

Yes, you added it to dev right after the nuget package build, I remember, because you wanted to test it with your server first....

view this post on Zulip Michel Rutten (Apr 23 2018 at 10:08):

Hi @Stephen Lloyd, see the definition of datatype code:
http://hl7.org/fhir/datatypes.html#code
"Technically, a code is restricted to a string which has at least one character and no leading or trailing whitespace, and where there is no whitespace other than single spaces in the contents"
So codes could contain characters that are not allowed for identifiers in a programming language.

view this post on Zulip Stephen Lloyd (Apr 23 2018 at 11:55):

Hi @Michel Rutten , thanks for the response however the question was more targeted at the dotnet implementation approach. I'm actually interested in how people have addressed this issue when using the .net Fhir API so far (from an implementation point of view). As the specification says "almost anything" as you've highlighted, what is the safest way of mapping these to the existing enumeration values? For the example I highlighted I can just replace all instances of hyphen with an empty string and "entered-in-error" becomes "enteredinerror" I can then do an Enum.Parse(~) to determine the correct enum value at runtime. This approach however may not catch all exceptions to the programming requirements of an enum for code names.

view this post on Zulip Ewout Kramer (May 07 2018 at 12:52):

This is the code we using to generate the C# enums:

string ConvertEnumValue(string name)
    {
        if (name.StartsWith("_"))
            name = name.Substring(1);
        if (name == "=")
            return "Equal";
        if (name == "<")
            return "LessThan";
        if (name == "<=")
            return "LessOrEqual";
        if (name == ">=")
            return "GreaterOrEqual";
        if (name == ">")
            return "GreaterThan";
        string[] bits = name.Split(new char[] {' ', '-'});
        string result = null;
        foreach (var bit in bits)
        {
            result += bit.Substring(0, 1).ToUpper();
            result += bit.Substring(1);
        }
        int IsIntegerValue;
        if (int.TryParse(result, out IsIntegerValue))
            result = "N" + result;
        return result;
}

view this post on Zulip Brian Postlethwaite (May 07 2018 at 12:56):

We already followed up on this one with the more reliable way using the function that does this in the project

Hl7.Fhir.Model.AdministrativeGender? gender = EnumUtility.ParseLiteral<Hl7.Fhir.Model.AdministrativeGender>("male");

view this post on Zulip Yunwei Wang (Oct 23 2018 at 14:37):

The same as you added patient. Add composition as a resource entry to bundle

myBundle.AddResourceEntry(composition, url)

Last updated: Apr 12 2022 at 19:14 UTC