FhirRequest.capabilities constructor
const
FhirRequest.capabilities({
- required Uri base,
- @Default(false) bool pretty,
- @Default(Summary.none) Summary summary,
- @Default('json') String format,
- @Default(<String>[]) List<
String> elements, - @Default(<String>[]) List<
String> parameters, - @Default(Mode.full) Mode mode,
- MimeType? mimeType,
- @Default('application/fhir+json') String accept,
- @JsonKey(includeFromJson: false, includeToJson: false) Client? client,
- Map<
String, String> ? headers,
SEARCH-ALL constructor
base
- the base URI for the FHIR server
pretty
- pretty print the json formatting in the response
summary
- do you want the result to be a summary
format
- currently requests json, but could consider requesting
json+fhir or fhir+json (would not request XML as this library doesn't
work with XML)
elements
- elements you need to pass in
parameters
- any extra parameters
mode
- defines the mode as defined https://www.hl7.org/fhir/http.html#capabilities
mimeType
- specify the MimeType in the Header - this should be fhir+json
but there are some older systems that won't accept that
client
- if there's a specific client that you're going to be using
Implementation
const factory FhirRequest.capabilities({
/// [base] - the base URI for the FHIR server
required Uri base,
/// [pretty] - pretty print the json formatting in the response
@Default(false) bool pretty,
/// [summary] - do you want the result to be a summary
@Default(Summary.none) Summary summary,
/// [format] - currently requests json, but could consider requesting
/// json+fhir or fhir+json (would not request XML as this library doesn't
/// work with XML)
@Default('json') String format,
/// [elements] - elements you need to pass in
@Default(<String>[]) List<String> elements,
/// [parameters] - any extra parameters
@Default(<String>[]) List<String> parameters,
/// [mode] - defines the mode as defined https://www.hl7.org/fhir/http.html#capabilities
@Default(Mode.full) Mode mode,
/// [mimeType] - specify the MimeType in the Header - this should be fhir+json
/// but there are some older systems that won't accept that
MimeType? mimeType,
/// [accept] - this will default to fhir+json just so it will stop sending
/// me XML - I hate XML
@Default('application/fhir+json') String accept,
/// [client] - if there's a specific client that you're going to be using
// ignore: invalid_annotation_target
@JsonKey(includeFromJson: false, includeToJson: false) Client? client,
/// [headers] - because there are some times it's easier to incldue the
/// headers in the object instead of only passing it in with the
/// request
Map<String, String>? headers,
}) = FhirCapabilitiesRequest;