-
Notifications
You must be signed in to change notification settings - Fork 0
How FhirStarter.Inferno works
The FhirStarter.Inferno contains references to FhirStarter.Bonfire and Fhirstarter.Flare project. The ExamplePatientService under Services is meant to get you going with a new FHIR server implementation.
To create your own service, make a new service under Services like this
public class ExampleService : IFhirService
{
}
Let Visual Studio add the missing methods so you end up with something like this
` public class ExampleService : IFhirService { public List GetSupportedResources() { throw new NotImplementedException(); }
public string GetAlias()
{
throw new NotImplementedException();
}
public List<ModelInfo.SearchParamDefinition> SearchParameters()
{
throw new NotImplementedException();
}
public OperationDefinition GetOperationDefinition()
{
throw new NotImplementedException();
}
public HttpResponseMessage Create(IKey key, Resource resource)
{
throw new NotImplementedException();
}
public Base Read(SearchParams searchParams)
{
throw new NotImplementedException();
}
public Base Read(string id)
{
throw new NotImplementedException();
}
public HttpResponseMessage Update(IKey key, Resource resource)
{
throw new NotImplementedException();
}
public HttpResponseMessage Delete(IKey key)
{
throw new NotImplementedException();
}
`
Normally you just need to return the one supported resource you use here. F.ex. the resource Patient. The idea behind this method was to display which FHIR Resources could be returned by the queried Resource.
The alias for the service, aka the resource you run your requests against. Ex. http://hostname//fhir/<resource / alias> The reason why there's a GetAlias method, is due to the fact that FhirStarter only supports queries against one basic service in the url, but it supports several aliases.
TODO: rename alias
Lists all supported queries in the current service for the conformance (ex. ../fhir/metadata) Check the example to see how the SearchParams are described.
Creates the conformity for OperationDefintion on a separate URL Check the example to see how OperationDefinitions are described.
Describes how to create a record in a dataprovider
Describes how to read data from a dataprovider by using SearchParams object
Describes how to read data from a dataprovider by using an string id
Updates a record in a dataprovider with the provided resource
Deletes a record by using the key