GithubHelp home page GithubHelp logo

aidbox-dotnet's Introduction

adibox-dotnet

Installation

  1. Clone the Repository: Use git clone to clone the library's repository to your local machine.
[email protected]:Aidbox/aidbox-dotnet.git
  1. Build the Library: Navigate to the cloned repository's directory and use the .NET CLI to build the project.
cd aidbox-dotnet
dotnet build
  1. Reference the Library in Your Project: After building the library, you can reference the resulting DLL in your project directly.
dotnet add reference ../path/to/library/library.csproj

Usage

Auth

using Aidbox.FHIR.Base;
using Aidbox.FHIR.Resource;
using Aidbox.FHIR.Constraint;
using API;

Auth authorization = new()
{
    Method = AuthMethods.BASIC,
    Credentials = new() { Username = "basic", Password = "secret" }
};

Client client = new("https://name.aidbox.app", authorization);

Models

HumanName name = new() { Given = ["Gena"], Family = "Razmakhnin" };
Coding coding = new() {
    System = "http://terminology.hl7.org/CodeSystem/v2-0203",
    Code = "SS",
    Display = "Social Security Number"
};
Identifier identifier = new()
{
    Use = "official",
    Type = new CodeableConcept() { Coding = [coding] },
    System = "urn:oid:2.16.840.1.113883.4.1",
    Value = "123-45-6789"
};

var patient = new McodeCancerPatient()
{
    Gender = "male",
    Name = [name],
    Identifier = [identifier]
}

REST

await client.Create(new McodeCancerPatient()
    {
        Gender = "male",
        Name = [name],
        Identifier = [identifier]
    }
);

var (patient, error) = await client.Read<McodeCancerPatient>("patient-1")

Demo project

How to run

dotnet run --project examples/AidboxClient

aidbox-dotnet's People

Contributors

krvital avatar genarazmakhnin avatar

Watchers

Nikolai Ryzhikov avatar Maksym avatar Aleksandr Penskoi avatar Marat Surmashev avatar Igor Kislitsyn avatar Mike Ryzhikov avatar Vitaly Banchenko avatar Mikhail Kulakov avatar  avatar Alexander Streltsov avatar HealthSamurai Deployer Bot avatar Andrey Osipenko avatar  avatar Ivan Bagrov avatar

aidbox-dotnet's Issues

Add polymorphic fields support

Instead of using one of the fields like here

var patient = new Patient();
patient.DeceasedBoolean = true;
// or
patient.DeceasedDateTime = new DateOnly("2024-01-01") 

Use polymorphic field

var patient = new Patient();
patient.Deceased = true;
// or
patient.Deceased = new DateTime(2000, 1, 1, 12, 39, 0); 

Typed Search Parameters

Provide search parameters structures/classes for each resource that'll have all of the properties according to FHIR's resources search parameters.

One of the possible solutions

var params = new PatientSearchParams {
  Active = true,
  Given = "John Doe",
  GeneralPractitioner = "",
  Count = 10,
  Page = 2,
};
var results = client.Search(params);

Enhanced Search API

This is nice to have enhancement.

Add helper methods for search / search parameters object that'll allow add or mutate common search params.

Example:

var params = new PatientSearchParams {
  Given = "John Doe"
};

var enhancedParams = params.Count(10).Limit(100);

var results = await aidbox.Search<Patient>(params)

Provide Search / List method for requesting entries list

As a developer using Aidbox .NET SDK, I want to have a Search method available so that I can get list of patients, observations, etc.

This version of search should provide an ability to

  • define count of returned entries
  • define a requested page

Constrain possible values for "code" fields

As a developer using Aidbox .NET SDK, I want to have strict types provided for fields with code-like values so that I can use values from autocomplete.

For this purpose we need to parse FHIR value sets and generate C# enums or any other way providing union-like type

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.