stu3 library

Enums

Compartment
COMPARTMENT Enum Represents a way to find related resources quickly Defined here: https://www.hl7.org/fhir/compartmentdefinition.html
MimeType
Mode
MODE Enum Defines the capabilities of the server https://www.hl7.org/fhir/http.html#capabilities
RestfulRequest
Types of restful requests allowed. FHIR specifies many different types of interactions with a server, but all are eventually one of these types
Summary
COMPARTMENT Enum The client can request the server to return only a portion of the resources by using this parameter Defined here: https://www.hl7.org/fhir/search.html#summary

Constants

CompartmentEnumMap → const Map<Compartment, String>
Map to convert from an Enum to a String for making the request
MimeTypeEnumMap → const Map<MimeType, String>
Map to convert from an Enum to a String
ModeEnumMap → const Map<Mode, String>
Map to convert from an Enum to a String for making the request
SummaryEnumMap → const Map<Summary, String>
Map to convert from an Enum to a String for making the request

Functions

enumToString<T>(T enumValue) String?
A more advanced way to change an enum to a string, mostly used for Resource types, but also for some enum specifically defined for requests
incorrectResultType<T>(Resource result) → OperationOutcome
Returns an OperationOutcome that contains the given Resource and a message stating that it was not the type of resource that was specified
isInformational(OperationOutcome operationOutcome) bool
parseBundle(Bundle bundle) ReturnResults<Resource>
Extracts all Resources that were returned by the Bundle, as long as they aren't OperationOutcomes, and includes all entries as informational OperationOutcomes that don't contain a Resource
parseBundleForType<T>(Bundle bundle) ReturnResults<T>
Extracts all Resources that were returned by the Bundle as long as they are of type T
parseRequestResult(Resource result) ReturnResults<Resource>
There are usually 3 types of responses from a RESTful request made to a FHIR server. It can be a single Resource, it can be a Bundle, or it can be an OperationOutcome (usually indicating an error). The functions below return an object called ReturnResults. It contains 3 lists.
parseRequestResultForType<T>(Resource result) ReturnResults<T>
If you searched or requested only a specific type of result, this will perform similarly to above, but will return ONLY that type of resource in the resources field, others will be included in the otherResources as well as in an OperationOutcome as a contained resource
simpleEnumToString<T>(T enumValue) String?
Simple enum to String function, just takes whatever is after the "." and returns it as a String