use crate::category::PRIORITY_SYSTEM;
use crate::crosswalk::imaging::{IMAGING_COMPOSITION, IMAGING_DIAGNOSTIC_REPORT};
use crate::document::form::{Authorship, Code, Companion, Form, Kind, SectionRule, Slot};
use crate::document::{EU_CORE_PATIENT, LOINC};
pub const IMAGING_BUNDLE: &str =
"http://hl7.eu/fhir/imaging/StructureDefinition/BundleReportEuImaging";
pub const IMAGING_REPORT: &str = "18726-0";
pub const IMAGING_CATEGORIES: [Code; 2] = [
Code {
system: LOINC,
code: "85430-7",
},
Code {
system: PRIORITY_SYSTEM,
code: "Medical-Imaging",
},
];
pub const IMAGING_SLOTS: [Slot; 10] = [
Slot::new("imagingstudy", "18726-0", "Imaging study"),
Slot::new("order", "55115-0", "Order"),
Slot::new("history", "11329-0", "History"),
Slot::new("procedure", "55111-9", "Procedure"),
Slot::new("comparison", "18834-2", "Comparison"),
Slot::new("findings", "59776-5", "Findings"),
Slot::new("impression", "19005-8", "Impressions"),
Slot::new("recommendation", "18783-1", "Recommendations"),
Slot::new("communication", "73568-8", "Communications"),
Slot::new("report", "LP173421-1", "Report"),
];
pub const IMAGING_REPORT_FORM: Form = Form {
bundle: IMAGING_BUNDLE,
composition: IMAGING_COMPOSITION,
patient: EU_CORE_PATIENT,
kind: Kind::Report {
fallback: Code {
system: LOINC,
code: IMAGING_REPORT,
},
},
categories: &IMAGING_CATEGORIES,
authorship: Authorship::ReportPerformers,
slots: &IMAGING_SLOTS,
report: Some(Companion {
profile: IMAGING_DIAGNOSTIC_REPORT,
link: "http://hl7.eu/fhir/extensions/StructureDefinition/composition-diagnosticReportReference",
back: "http://hl7.org/fhir/5.0/StructureDefinition/extension-DiagnosticReport.composition",
}),
encounter: None,
language: false,
rules: &[
SectionRule::Reasoned {
invariant: "eu-imaging-composition-1",
slices: &[
"imagingstudy",
"order",
"history",
"procedure",
"comparison",
"findings",
"impression",
"recommendation",
"communication",
"report",
],
},
SectionRule::Required {
slices: &["imagingstudy", "order", "history", "procedure"],
},
],
};