HL7.CDSHooks.Domain
1.0.1
dotnet add package HL7.CDSHooks.Domain --version 1.0.1
NuGet\Install-Package HL7.CDSHooks.Domain -Version 1.0.1
<PackageReference Include="HL7.CDSHooks.Domain" Version="1.0.1" />
<PackageVersion Include="HL7.CDSHooks.Domain" Version="1.0.1" />
<PackageReference Include="HL7.CDSHooks.Domain" />
paket add HL7.CDSHooks.Domain --version 1.0.1
#r "nuget: HL7.CDSHooks.Domain, 1.0.1"
#addin nuget:?package=HL7.CDSHooks.Domain&version=1.0.1
#tool nuget:?package=HL7.CDSHooks.Domain&version=1.0.1
HL7 CDS Hooks Domain Objects
Release 2.0
JSON Rules
Use of JSON
All data exchanged through production RESTful APIs MUST be sent and received as JSON (JavaScript Object Notation) structures and are transmitted over HTTPS. See Security and Safety section.
Null and Empty JSON Elements
- JSON elements SHALL NOT be null, unless otherwise specified.
- JSON elements SHALL NOT be empty, unless otherwise specified (e.g. to indicate no guidance with an empty array of cards in the CDS Hooks response).
If a JSON attribute is defined as OPTIONAL, and does not have a value, implementers MUST omit it. For instance, OPTIONAL JSON string and array attributes are omitted rather than having a null or empty value.
Unless otherwise specified, JSON attribute values SHALL NOT be null or empty, so null
, ""
, []
, or {}
are prohibited. If a JSON attribute is defined as OPTIONAL, and does not have a value, implementers SHALL omit it.
CDS Card Models (CDS Service Response Object)
Namespace: HL7.CDSHooks.Domain.Models.Card
Examples:
var card = new CdsCard
{
//Required
Summary = "CDS Hook Card Response Example",
Indicator = CardIndicatorTypes.Information,
Source = new() //CdsSource
{
//Required
Label = "Source Label",
//Optional
Icon = new("http://example.com/icon.png"), //Uri
Url = new("http://learnmore.com"), //Uri
},
//Optional
Uuid = Guid.NewGuid().ToString(),
Detail = """
**GitHub Flavored Markdown**
# Header
> Sub-description n' stuff.
## Items
* First
* Second
* Third
""",
Links = [
new()
{
Label = "Link Display Text",
Url = "http://somelinktext.boom",
Type = CardLinkTypes.Absolute
}
]
};
HTTP Requests & Response Models
Discovery Endpoint Response
The response to the discovery endpoint SHALL be an object containing a list of CDS Services.
Namespace: HL7.CDSHooks.Domain.Models.Rest.Responses
var services = new CdsServiceDiscoveryResponse()
{
Services =
[
new()
{
//Required
Id = "0001",
Description = "Say hello to patient from CDS Hook",
Hook = CdsHooks.PatientView,
//Optional
Title = "SomeEHR Patient View CDS Hook",
Prefetch = new Dictionary<string, string>
{
{ "patient", "Patient/{{context.patientId}}" },
{ "conditions", "Condition?patient={{context.patientId}}" }
}
}
]
};
Feedback
var feedback = new CdsFeedback
{
//Required
Card = "0001", // Card.Uuid the feedback is for
Outcome = OutcomeTypes.Accepted, //Accepted of Overridden use constants to avoid errors
OutcomeTimestamp = DateTime.UtcNow.ToISO8601Format(), //Use Extensions to maintain expected format.
};
Constants (Error Free value passing)
Namespace: HL7.CDSHooks.Domain.Constants
Constant | Value | Documentation |
---|---|---|
CdsHooks.AllergyIntoleranceCreate |
"allergyintolerance-create" |
Link |
CdsHooks.PatientView |
"patient-view" |
Link |
CdsHooks.MedicationPrescribe |
"medication-prescribe" |
Link |
CdsHooks.OrderDispatch |
"order-dispatch" |
Link |
CdsHooks.OrderReview |
"order-review" |
Link |
CdsHooks.OrderSelect |
"order-select" |
Link |
CdsHooks.OrderSign |
"order-sign" |
Link |
CdsHooks.AppointmentBook |
"appointment-book" |
Link |
CdsHooks.EncounterStart |
"encounter-start" |
Link |
CdsHooks.EncounterDischarge |
"encounter-discharge" |
Link |
CdsHooks.MedicationRefill |
"medication-refill" |
Link |
CdsHooks.ProblemListItemCreate |
"problem-list-item-create" |
Link |
Constant | Value |
---|---|
CardActionTypes.Create |
"create" |
CardActionTypes.Update |
"update" |
CardActionTypes.Delete |
"delete" |
Constant | Value |
---|---|
CardIndicatorTypes.Information |
"info" |
CardIndicatorTypes.Warning |
"warning" |
CardIndicatorTypes.Critical |
"critical" |
Constant | Value |
---|---|
CardLinkTypes.Absolute |
"absolute" |
CardLinkTypes.Smart |
"smart" |
Constant | Value |
---|---|
OutcomeTypes.Accepted |
"accepted" |
OutcomeTypes.Overridden |
"overridden" |
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
-
net9.0
- Hl7.Fhir.Specification.R4 (>= 5.11.4)
- Newtonsoft.Json (>= 13.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.1 | 101 | 2/26/2025 |