use crate::category::Root;
use crate::crosswalk::Crosswalk;
use crate::crosswalk::EhnElement;
use crate::crosswalk::Populate;
use crate::crosswalk::Row;
mod report;
mod study;
pub const IMAGING_COMPOSITION: &str =
"http://hl7.eu/fhir/imaging/StructureDefinition/CompositionEuImaging";
pub const IMAGING_DIAGNOSTIC_REPORT: &str =
"http://hl7.eu/fhir/imaging/StructureDefinition/DiagnosticReportEuImaging";
pub const IMAGING_STUDY_PROFILE: &str =
"http://hl7.eu/fhir/imaging/StructureDefinition/ImagingStudyEuImaging";
pub static IMAGING_REPORT: Crosswalk<'static> = Crosswalk {
root: Root {
model: "http://www.xt-ehr.eu/fhir/models/StructureDefinition/EHDSImagingReport",
obligations: "http://www.xt-ehr.eu/fhir/models/StructureDefinition/EHDSImagingReportObligations",
},
profile: IMAGING_COMPOSITION,
companions: &[IMAGING_DIAGNOSTIC_REPORT],
sliced: "Composition.section",
ehn: EHN,
rows: report::ROWS,
gaps: &[],
};
pub static IMAGING_STUDY: Crosswalk<'static> = Crosswalk {
root: Root {
model: "http://www.xt-ehr.eu/fhir/models/StructureDefinition/EHDSImagingStudy",
obligations: "http://www.xt-ehr.eu/fhir/models/StructureDefinition/EHDSImagingStudyObligations",
},
profile: IMAGING_STUDY_PROFILE,
companions: &[],
sliced: "ImagingStudy.identifier",
ehn: EHN,
rows: study::ROWS,
gaps: &[],
};
const EHN: &[EhnElement] = &[
ehn("A.1", "Report header data elements"),
ehn("A.1.1", "Identification of the patient/subject"),
ehn("A.1.2", "Patient/subject related contact information"),
ehn("A.1.4", "Information recipient"),
ehn("A.1.5", "Author"),
ehn("A.1.6", "Legal authenticator"),
ehn("A.1.6.4", "Legal authentication date and time"),
ehn("A.1.7", "Result validator"),
ehn("A.1.7.4", "Validation date and time"),
ehn("A.1.8.0", "Document ID"),
ehn("A.1.8.1", "Document type"),
ehn("A.1.8.2", "Document status"),
ehn("A.1.8.3", "Report date and time"),
ehn("A.1.8.4", "Document title"),
ehn("A.1.8.5", "Imaging procedure"),
ehn("A.1.8.6", "Report custodian"),
ehn("A.1.8.8", "Language"),
ehn("A.1.8.11", "Accession number"),
ehn("A.2", "Order information"),
ehn("A.2.1", "Order ID"),
ehn("A.2.2", "Order date and time"),
ehn("A.3", "Order reason"),
ehn("A.3.3", "Clinical question"),
ehn("A.4", "Specimen information"),
ehn("A.5", "Examination Report"),
ehn("A.5.1", "Imaging procedure"),
ehn("A.5.1.1", "Modality"),
ehn("A.5.1.6", "Anatomical focus"),
ehn("A.5.2", "Medication"),
ehn("A.5.3", "Adverse reaction"),
ehn("A.5.4", "Results"),
ehn("A.5.5", "Conclusion"),
ehn("A.5.5.1", "Impression"),
ehn("A.5.5.2", "Coded conclusions"),
ehn("A.5.6", "Recommendation"),
ehn("A.5.6.1", "Description"),
ehn("A.5.6.2", "Care plan"),
ehn("A.7", "Comparison study"),
ehn("A.8", "Presented form"),
ehn("B.1", "Imaging study Manifest Dataset"),
ehn("B.1.1", "Study instance UID"),
ehn("B.1.2", "Description"),
ehn("B.1.3", "Study custodian"),
ehn("B.1.4", "List of Series"),
ehn("B.1.4.1", "Series Description"),
ehn("B.1.4.2", "Series Unique Identifier"),
ehn("B.1.4.3", "Modality"),
ehn("B.1.4.5", "Other series information"),
ehn("B.1.4.6", "Series endpoint"),
ehn("B.1.4.7", "List of Instances in the series"),
ehn("B.1.4.7.1", "Instance Globally Unique Identifier"),
ehn("B.1.4.7.2", "Instance Class Globally Unique Identifier"),
ehn("B.1.4.7.3", "Instance Number"),
];
const ORDER: &str = "http://hl7.eu/fhir/imaging/StructureDefinition/ServiceRequestOrderEuImaging";
const PROCEDURE: &str = "http://hl7.eu/fhir/imaging/StructureDefinition/ProcedureEuImaging";
const FINDING: &str = "http://hl7.eu/fhir/imaging/StructureDefinition/ObservationFindingEuImaging";
const RADIATION_DOSE: &str =
"http://hl7.eu/fhir/imaging/StructureDefinition/ObservationRadiationDoseEuImaging";
const OBSERVATION: &str = "http://hl7.org/fhir/StructureDefinition/Observation";
const CONDITION: &str = "http://hl7.org/fhir/StructureDefinition/Condition";
const DEVICE: &str = "http://hl7.org/fhir/StructureDefinition/Device";
const MEDICATION_ADMINISTRATION: &str =
"http://hl7.org/fhir/StructureDefinition/MedicationAdministration";
const ADVERSE_EVENT: &str = "http://hl7.org/fhir/StructureDefinition/AdverseEvent";
const CARE_PLAN: &str = "http://hl7.org/fhir/StructureDefinition/CarePlan";
const SPECIMEN: &str = "http://hl7.org/fhir/StructureDefinition/Specimen";
const NONE: &[&str] = &[];
const ASSEMBLED: &[&str] = &[];
const ORDERED: &[&str] = &[ORDER];
const STUDY: &[&str] = &[IMAGING_STUDY_PROFILE];
const SHALL: Option<Populate> = Some(Populate::Shall);
const SHOULD: Option<Populate> = Some(Populate::Should);
const fn ehn(id: &'static str, name: &'static str) -> EhnElement {
EhnElement { id, name }
}
const fn row(
path: &'static str,
ehn: &'static [&'static str],
producer: Option<Populate>,
eps: &'static str,
contexts: &'static [&'static str],
) -> Row {
Row {
path,
ehn,
producer,
eps,
contexts,
}
}