From 31b609b0fc4dfee9f5afab46d2215ef7c2ef057e Mon Sep 17 00:00:00 2001 From: Vincenzo Ingenito Date: Wed, 24 Jul 2024 12:49:34 +0200 Subject: [PATCH] feat: Update rap validator --- .../sanita/gva/enums/RADErrorEnum.java | 103 +------ .../sanita/gva/validator/RADValidator.java | 253 ++++-------------- 2 files changed, 51 insertions(+), 305 deletions(-) diff --git a/gtw-certifier/src/main/java/it/finanze/sanita/gva/enums/RADErrorEnum.java b/gtw-certifier/src/main/java/it/finanze/sanita/gva/enums/RADErrorEnum.java index d64d6cd..773cbdb 100644 --- a/gtw-certifier/src/main/java/it/finanze/sanita/gva/enums/RADErrorEnum.java +++ b/gtw-certifier/src/main/java/it/finanze/sanita/gva/enums/RADErrorEnum.java @@ -3,6 +3,7 @@ */ package it.finanze.sanita.gva.enums; + import it.finanze.sanita.gva.validator.IUC; import lombok.AccessLevel; import lombok.AllArgsConstructor; @@ -11,106 +12,10 @@ @Getter @AllArgsConstructor(access = AccessLevel.PRIVATE) public enum RADErrorEnum implements IUC{ - ESAME_ESEGUITO_CODE("001"), - ESAME_ESEGUITO_CODE_SYSTEM("002"), - ESAME_ESEGUITO_CODE_SYSTEM_NAME("003"), - ESAME_ESEGUITO_DISPLAY_NAME("004"), - ESAME_ESEGUITO_MOOD_CODE("005"), - ESAME_ESEGUITO_CLASS_CODE("006"), - ESAME_ESEGUITO_EFFECTIVE_TIME("007"), - - REFERTO_CODE("008"), - REFERTO_CODE_SYSTEM("009"), - REFERTO_CODE_SYSTEM_NAME("010"), - REFERTO_DISPLAY_NAME("011"), - - CONCLUSIONI_CODE("012"), - CONCLUSIONI_CODE_SYSTEM("013"), - CONCLUSIONI_CODE_SYSTEM_NAME("014"), - CONCLUSIONI_DISPLAY_NAME("015"), - - DICOM_CODE("016"), - DICOM_CODE_SYSTEM("017"), - DICOM_CODE_SYSTEM_NAME("018"), - DICOM_DISPLAY_NAME("019"), - - QUESITO_CODE("020"), - QUESITO_CODE_SYSTEM("021"), - QUESITO_CODE_SYSTEM_NAME("022"), - QUESITO_DISPLAY_NAME("023"), - QUESITO_OBS_MOOD_CODE("024"), - QUESITO_OBS_CLASS_CODE("025"), - QUESITO_OBS_CODE("026"), - QUESITO_OBS_CODE_SYSTEM("027"), - QUESITO_OBS_CODE_SYSTEM_NAME("028"), - QUESITO_OBS_DISPLAY_NAME("029"), - QUESITO_OBS_VALUE_CODE_SYSTEM("030"), - QUESITO_OBS_VALUE_CODE_SYSTEM_NAME("031"), - - STORIA_CODE("032"), - STORIA_CODE_SYSTEM("033"), - STORIA_CODE_SYSTEM_NAME("034"), - STORIA_CODE_DISPLAY_NAME("035"), - STORIA_OBS_MOOD_CODE("036"), - STORIA_OBS_CLASS_CODE("037"), - STORIA_OBS_CODE("038"), - STORIA_OBS_CODE_SYSTEM("039"), - STORIA_OBS_CODE_SYSTEM_NAME("040"), - STORIA_OBS_DISPLAY_NAME("041"), - STORIA_ORG_MOOD_CODE("043"), - STORIA_ORG_CLASS_CODE("044"), - STORIA_ORG_CODE("045"), - STORIA_ORG_CODE_SYSTEM("046"), - STORIA_ORG_STATUS_CODE("047"), - STORIA_ORG_REL_CLASS_CODE("048"), - STORIA_ORG_REL_SUB_GEN("050"), - STORIA_ORG_OBS_VALUE_TYPE("052"), - STORIA_ORG_OBS_VALUE_CODE("053"), - STORIA_ORG_OBS_VALUE_CODE_SYSTEM("054"), - STORIA_ORG_OBS_VALUE_CODE_SYSTEM_NAME("055"), - STORIA_ORG_OBS_VALUE_DISPLAY_NAME("056"), - STORIA_ORG_OBS_CLASS_CODE("057"), - STORIA_ORG_OBS_MOOD_CODE("058"), - STORIA_ALLERGIE_CODE("059"), - STORIA_ALLERGIE_CODE_SYSTEM("060"), - STORIA_ALLERGIE_CODE_SYSTEM_NAME("061"), - STORIA_ALLERGIE_CODE_DISPLAY_NAME("062"), - STORIA_ALLERGIE_ACT_OBS_CODE("065"), - STORIA_ALLERGIE_ACT_OBS_CODE_SYSTEM("066"), - STORIA_ALLERGIE_ACT_OBS_DISPLAY_NAME("067"), - STORIA_ALLERGIE_ACT_OBS_STATUS_CODE("068"), - STORIA_ALLERGIE_ACT_OBS_VALUE_CODE("069"), - STORIA_ALLERGIE_ACT_OBS_OBS_CODE("070"), - STORIA_ALLERGIE_ACT_OBS_OBS_CODE_SYSTEM("071"), - STORIA_ALLERGIE_ACT_OBS_OBS_CODE_SYSTEM_NAME("072"), - STORIA_ALLERGIE_ACT_OBS_OBS_DISPLAY_NAME("073"), - STORIA_ALLERGIE_ACT_OBS_OBS_STATUS_CODE("074"), - STORIA_ALLERGIE_ACT_OBS_ACT_CODE("075"), - STORIA_ALLERGIE_ACT_OBS_ACT_CODE_SYSTEM("076"), - STORIA_ALLERGIE_ACT_OBS_ACT_CODE_SYSTEM_NAME("077"), - STORIA_ALLERGIE_ACT_OBS_ACT_DISPLAY_NAME("078"), - STORIA_ALLERGIE_ACT_OBS_ACT_STATUS("079"), - ESAMI_CODE("080"), - ESAMI_CODE_SYSTEM("081"), - ESAMI_CODE_SYSTEM_NAME("082"), - ESAMI_DISPLAY_NAME("083"), - ESAMI_OBS_MOOD_CODE("084"), - ESAMI_OBS_CLASS_CODE("085"), - ESAMI_OBS_EFF_TIME("086"), - ESAMI_OBS_EFF_TIME_LOW("087"), - ESAMI_OBS_EFF_TIME_HIGH("088"), - - SUGGERIMENTI_CODE("089"), - SUGGERIMENTI_CODE_SYSTEM("090"), - SUGGERIMENTI_CODE_SYSTEM_NAME("091"), - SUGGERIMENTI_CODE_DISPLAY_NAME("092"), + T001("001"), T002("002"), T003("003"), T004("004"), T005("005"), T006("006"), T007("007"), T008("008"), T009("009"), T010("010"), T011("011"), T012("012"), T013("013"), T014("014"), T015("015"), T016("016"), T017("017"), T018("018"), T019("019"), T020("020"), T021("021"), T022("022"), T023("023"), T024("024"), T025("025"), + T026("026"), T027("027"), T028("028"), T029("029"), T030("030"), T031("031"), T032("032"), T033("033"), T034("034"), T035("035"), T036("036"), T037("037"), T038("038"), T039("039"), T040("040"), T041("041"); - INFO_AGG_CODE("093"), - INFO_AGG_CODE_SYSTEM("094"), - INFO_AGG_CODE_SYSTEM_NAME("095"), - INFO_AGG_CODE_DISPLAY_NAME("096"); - - private String code; + private final String code; } diff --git a/gtw-certifier/src/main/java/it/finanze/sanita/gva/validator/RADValidator.java b/gtw-certifier/src/main/java/it/finanze/sanita/gva/validator/RADValidator.java index f9fa5f7..f978137 100644 --- a/gtw-certifier/src/main/java/it/finanze/sanita/gva/validator/RADValidator.java +++ b/gtw-certifier/src/main/java/it/finanze/sanita/gva/validator/RADValidator.java @@ -13,219 +13,60 @@ @NoArgsConstructor(access = AccessLevel.PRIVATE) public final class RADValidator extends DocumentTypeValidator { - public static List validateUC1(String xml) { + + public static List validateUC1(String xml){ List errors = new ArrayList<>(); - esameEseguito(xml, errors); - referto(xml, errors); - return errors; - } - public static List validateUC2(String xml) { - List errors = new ArrayList<>(); - esameEseguito(xml, errors); - referto(xml, errors); - conclusioni(xml, errors); - return errors; - } + ValidationXML.equalIC(errors, RADErrorEnum.T001, xml, "ClinicalDocument > component > structuredBody > component > section[ID=DICOM_Object_Catalog] > code", "code", "121181"); + ValidationXML.equalIC(errors, RADErrorEnum.T002, xml, "ClinicalDocument > component > structuredBody > component > section[ID=DICOM_Object_Catalog] > code", "codeSystem", "1.2.840.10008.2.16.4"); + ValidationXML.equalIC(errors, RADErrorEnum.T003, xml, "ClinicalDocument > component > structuredBody > component > section[ID=DICOM_Object_Catalog] > code", "codeSystemName", "DCM"); + ValidationXML.equalIC(errors, RADErrorEnum.T004, xml, "ClinicalDocument > component > structuredBody > component > section[ID=DICOM_Object_Catalog] > code", "displayName", "DICOM Object Catalog"); + ValidationXML.equalIC(errors, RADErrorEnum.T005, xml, "ClinicalDocument > component > structuredBody > component > section[ID=Quesito_diagnostico] > code", "code", "18785-6"); + ValidationXML.equalIC(errors, RADErrorEnum.T006, xml, "ClinicalDocument > component > structuredBody > component > section[ID=Quesito_diagnostico] > code", "codeSystem", "2.16.840.1.113883.6.1"); + ValidationXML.equalIC(errors, RADErrorEnum.T007, xml, "ClinicalDocument > component > structuredBody > component > section[ID=Quesito_diagnostico] > code", "codeSystemName", "LOINC"); + ValidationXML.equalIC(errors, RADErrorEnum.T008, xml, "ClinicalDocument > component > structuredBody > component > section[ID=Quesito_diagnostico] > code", "displayName", "Motivo per lo studio - Radiologia"); + ValidationXML.equalIC(errors, RADErrorEnum.T009, xml, "ClinicalDocument > component > structuredBody > component > section[ID=Quesito_diagnostico] > entry > observation", "moodCode", "EVN"); + ValidationXML.equalIC(errors, RADErrorEnum.T010, xml, "ClinicalDocument > component > structuredBody > component > section[ID=Complicanze] > entry > observation > code", "code", "75326-9"); + ValidationXML.equalIC(errors, RADErrorEnum.T011, xml, "ClinicalDocument > component > structuredBody > component > section[ID=Complicanze] > entry > observation > code", "codeSystem", "2.16.840.1.113883.6.1"); + ValidationXML.equalIC(errors, RADErrorEnum.T012, xml, "ClinicalDocument > component > structuredBody > component > section[ID=Suggerimenti_per_il_medico_prescrittore] > code", "code", "18783-1"); + ValidationXML.equalIC(errors, RADErrorEnum.T013, xml, "ClinicalDocument > component > structuredBody > component > section[ID=Suggerimenti_per_il_medico_prescrittore] > code", "codeSystem", "2.16.840.1.113883.6.1"); + ValidationXML.equalIC(errors, RADErrorEnum.T014, xml, "ClinicalDocument > component > structuredBody > component > section[ID=Suggerimenti_per_il_medico_prescrittore] > code", "codeSystemName", "LOINC"); + ValidationXML.equalIC(errors, RADErrorEnum.T015, xml, "ClinicalDocument > component > structuredBody > component > section[ID=Suggerimenti_per_il_medico_prescrittore] > code", "displayName", "Raccomandazione studio - Radiologia"); - public static List validateUC3(String xml) { - List errors = new ArrayList<>(); - esameEseguito(xml, errors); - referto(xml, errors); - conclusioni(xml, errors); - dicom(xml, errors); - quesito(xml, errors); - storiaV1(xml, errors); - precedentiEsami(xml, errors); - suggerimenti(xml, errors); return errors; } - public static List validateUC4(String xml) { + public static List validateUC2(String xml){ List errors = new ArrayList<>(); - esameEseguito(xml, errors); - conclusioni(xml, errors); - storiaV2(xml, errors); - precedentiEsami(xml, errors); - referto(xml, errors); - infoAggiuntive(xml, errors); - complicanze(xml, errors); - suggerimenti(xml, errors); - return errors; - } - private static void storiaV2(String xml, List errors) { - ValidationXML.equalIC(errors, RADErrorEnum.STORIA_CODE, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > code", "code", "11329-0"); - ValidationXML.equalIC(errors, RADErrorEnum.STORIA_CODE_SYSTEM, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > code", "codeSystem", "2.16.840.1.113883.6.1"); - ValidationXML.equalIC(errors, RADErrorEnum.STORIA_CODE_SYSTEM_NAME, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > code", "codeSystemName", "LOINC"); - ValidationXML.equalIC(errors, RADErrorEnum.STORIA_CODE_DISPLAY_NAME, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > code", "displayName", "Storia Generale"); - ValidationXML.equalIC(errors, RADErrorEnum.STORIA_OBS_MOOD_CODE, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > entry > observation", "moodCode", "EVN"); - ValidationXML.equalIC(errors, RADErrorEnum.STORIA_OBS_CLASS_CODE, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > entry > observation", "classCode", "OBS"); - ValidationXML.containsIC(errors, RADErrorEnum.STORIA_OBS_CODE, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > entry > observation > entryRelationship > observation > code", "code", "89261-2", "33999-4"); - ValidationXML.containsIC(errors, RADErrorEnum.STORIA_OBS_CODE_SYSTEM, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > entry > observation > entryRelationship > observation > code", "codeSystem", "2.16.840.1.113883.6.1"); - ValidationXML.containsIC(errors, RADErrorEnum.STORIA_OBS_CODE_SYSTEM_NAME, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > entry > observation > entryRelationship > observation > code", "codeSystemName", "LOINC"); - ValidationXML.containsIC(errors, RADErrorEnum.STORIA_OBS_DISPLAY_NAME, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > entry > observation > entryRelationship > observation > code", "displayName", "Decorso Clinico", "Stato"); - ValidationXML.equalIC(errors, RADErrorEnum.STORIA_ORG_MOOD_CODE, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > entry > organizer", "moodCode", "EVN"); - ValidationXML.equalIC(errors, RADErrorEnum.STORIA_ORG_CLASS_CODE, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > entry > organizer", "classCode", "CLUSTER"); - ValidationXML.equalIC(errors, RADErrorEnum.STORIA_ORG_CODE, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > entry > organizer > code", "code", "10157-6"); - ValidationXML.equalIC(errors, RADErrorEnum.STORIA_ORG_CODE_SYSTEM, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > entry > organizer > code", "codeSystem", "2.16.840.1.113883.6.1"); - ValidationXML.equalIC(errors, RADErrorEnum.STORIA_ORG_STATUS_CODE, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > entry > organizer > statusCode", "code", "completed"); - ValidationXML.equalIC(errors, RADErrorEnum.STORIA_ORG_REL_CLASS_CODE, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > entry > organizer > subject > relatedSubject", "classcode", "PRS"); - ValidationXML.equalIC(errors, RADErrorEnum.STORIA_ORG_OBS_VALUE_TYPE, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > entry > organizer > component > observation > value", "xsi:type", "CD"); - ValidationXML.equalIC(errors, RADErrorEnum.STORIA_ORG_OBS_VALUE_CODE_SYSTEM, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > entry > organizer > component > observation > value", "codeSystem", "2.16.840.1.113883.6.103"); - ValidationXML.containsIC(errors, RADErrorEnum.STORIA_ORG_OBS_CLASS_CODE, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > entry > organizer > component > observation > entryRelationship > observation", "classCode", "OBS"); - ValidationXML.containsIC(errors, RADErrorEnum.STORIA_ORG_OBS_MOOD_CODE, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > entry > organizer > component > observation > entryRelationship > observation", "moodCode", "EVN"); - ValidationXML.equalIC(errors, RADErrorEnum.STORIA_ALLERGIE_CODE, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > component > section[ID='Allergie'] > code", "code", "48765-2"); - ValidationXML.equalIC(errors, RADErrorEnum.STORIA_ALLERGIE_CODE_SYSTEM, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > component > section[ID='Allergie'] > code", "codeSystem", "2.16.840.1.113883.6.1"); - ValidationXML.equalIC(errors, RADErrorEnum.STORIA_ALLERGIE_CODE_SYSTEM_NAME, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > component > section[ID='Allergie'] > code", "codeSystemName", "LOINC"); - ValidationXML.equalIC(errors, RADErrorEnum.STORIA_ALLERGIE_CODE_DISPLAY_NAME, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > component > section[ID='Allergie'] > code", "displayName", "Allergie e/o reazioni avverse"); - ValidationXML.containsIC(errors, RADErrorEnum.STORIA_ALLERGIE_ACT_OBS_CODE, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > component > section[ID='Allergie'] > entry > act > entryRelationship > observation > code", "code", "52473-6"); - ValidationXML.containsIC(errors, RADErrorEnum.STORIA_ALLERGIE_ACT_OBS_CODE_SYSTEM, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > component > section[ID='Allergie'] > entry > act > entryRelationship > observation > code", "codeSystem", "2.16.840.1.113883.6.1"); - ValidationXML.containsIC(errors, RADErrorEnum.STORIA_ALLERGIE_ACT_OBS_DISPLAY_NAME, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > component > section[ID='Allergie'] > entry > act > entryRelationship > observation > code", "displayName", "Allergia o causa della reazione"); - ValidationXML.containsIC(errors, RADErrorEnum.STORIA_ALLERGIE_ACT_OBS_STATUS_CODE, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > component > section[ID='Allergie'] > entry > act > entryRelationship > observation > statusCode", "code", "completed"); - ValidationXML.equalIC(errors, RADErrorEnum.STORIA_ALLERGIE_ACT_OBS_VALUE_CODE, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > component > section[ID='Allergie'] > entry > act > entryRelationship > observation > value", "codeSystem", true, "2.16.840.1.113883.5.4"); - ValidationXML.containsIC(errors, RADErrorEnum.STORIA_ALLERGIE_ACT_OBS_OBS_CODE, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > component > section[ID='Allergie'] > entry > act > entryRelationship > observation > entryRelationship", "typeCode", "MFST", "SUBJ", "REFR"); - ValidationXML.containsIC(errors, RADErrorEnum.STORIA_ALLERGIE_ACT_OBS_OBS_CODE, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > component > section[ID='Allergie'] > entry > act > entryRelationship > observation > entryRelationship > observation > code", "code", "75321-0", "5321-0", "SEV", "33999-4"); - ValidationXML.containsIC(errors, RADErrorEnum.STORIA_ALLERGIE_ACT_OBS_OBS_CODE_SYSTEM, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > component > section[ID='Allergie'] > entry > act > entryRelationship > observation > entryRelationship > observation > code", "codeSystem", "2.16.840.1.113883.6.1", "2.16.840.1.113883.5.4"); - ValidationXML.containsIC(errors, RADErrorEnum.STORIA_ALLERGIE_ACT_OBS_OBS_CODE_SYSTEM_NAME, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > component > section[ID='Allergie'] > entry > act > entryRelationship > observation > entryRelationship > observation > code", "codeSystemName", "LOINC", "ActCode"); - ValidationXML.containsIC(errors, RADErrorEnum.STORIA_ALLERGIE_ACT_OBS_OBS_DISPLAY_NAME, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > component > section[ID='Allergie'] > entry > act > entryRelationship > observation > entryRelationship > observation > code", "displayName" , "Obiettività Clinica", "Clinical Finding", "Criticality", "Stato"); - ValidationXML.containsIC(errors, RADErrorEnum.STORIA_ALLERGIE_ACT_OBS_OBS_STATUS_CODE, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > component > section[ID='Allergie'] > entry > act > entryRelationship > observation > entryRelationship > observation > statusCode", "code", "completed"); - ValidationXML.containsIC(errors, RADErrorEnum.STORIA_ALLERGIE_ACT_OBS_ACT_CODE, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > component > section[ID='Allergie'] > entry > act > entryRelationship > observation > entryRelationship > act > code", "code", "48767-8"); - ValidationXML.containsIC(errors, RADErrorEnum.STORIA_ALLERGIE_ACT_OBS_ACT_CODE_SYSTEM, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > component > section[ID='Allergie'] > entry > act > entryRelationship > observation > entryRelationship > act > code", "codeSystem", "2.16.840.1.113883.6.1"); - ValidationXML.containsIC(errors, RADErrorEnum.STORIA_ALLERGIE_ACT_OBS_ACT_CODE_SYSTEM_NAME, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > component > section[ID='Allergie'] > entry > act > entryRelationship > observation > entryRelationship > act > code", "codeSystemName", "LOINC"); - ValidationXML.containsIC(errors, RADErrorEnum.STORIA_ALLERGIE_ACT_OBS_ACT_DISPLAY_NAME, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > component > section[ID='Allergie'] > entry > act > entryRelationship > observation > entryRelationship > act > code", "displayName", "Annotation comment"); - ValidationXML.containsIC(errors, RADErrorEnum.STORIA_ALLERGIE_ACT_OBS_ACT_STATUS, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > component > section[ID='Allergie'] > entry > act > entryRelationship > observation > entryRelationship > act > statusCode","code", "completed"); - } - - private static void complicanze(String xml, List errors) { - ValidationXML.equalIC(errors, RADErrorEnum.INFO_AGG_CODE, xml, "ClinicalDocument > component > structuredBody > component > section[ID=Complicanze] > code", "code", "55109-3"); - ValidationXML.equalIC(errors, RADErrorEnum.INFO_AGG_CODE, xml, "ClinicalDocument > component > structuredBody > component > section[ID=Complicanze] > code", "codeSystem", "2.16.840.1.113883.6.1"); - ValidationXML.equalIC(errors, RADErrorEnum.INFO_AGG_CODE, xml, "ClinicalDocument > component > structuredBody > component > section[ID=Complicanze] > code", "codeSystemName", "LOINC"); - ValidationXML.equalIC(errors, RADErrorEnum.INFO_AGG_CODE, xml, "ClinicalDocument > component > structuredBody > component > section[ID=Complicanze] > code", "displayName", "Complicazioni"); - ValidationXML.equalIC(errors, RADErrorEnum.INFO_AGG_CODE, xml, "ClinicalDocument > component > structuredBody > component > section[ID=Complicanze] > entry > observation", "moodCode", "EVN"); - ValidationXML.equalIC(errors, RADErrorEnum.INFO_AGG_CODE, xml, "ClinicalDocument > component > structuredBody > component > section[ID=Complicanze] > entry > observation", "classCode", "OBS"); - ValidationXML.equalIC(errors, RADErrorEnum.INFO_AGG_CODE, xml, "ClinicalDocument > component > structuredBody > component > section[ID=Complicanze] > entry > observation > code", "code", "75326-9"); - ValidationXML.equalIC(errors, RADErrorEnum.INFO_AGG_CODE, xml, "ClinicalDocument > component > structuredBody > component > section[ID=Complicanze] > entry > observation > code", "codeSystem", "2.16.840.1.113883.6.1"); - ValidationXML.hasDateFormat(errors, RADErrorEnum.INFO_AGG_CODE, xml, "ClinicalDocument > component > structuredBody > component > section[ID=Complicanze] > entry > observation > effectiveTime > low", "value"); - ValidationXML.hasDateFormat(errors, RADErrorEnum.INFO_AGG_CODE, xml, "ClinicalDocument > component > structuredBody > component > section[ID=Complicanze] > entry > observation > effectiveTime > high", "value"); - } - - private static void infoAggiuntive(String xml, List errors) { - ValidationXML.equalIC(errors, RADErrorEnum.INFO_AGG_CODE, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Informazioni_aggiuntive'] > code", "code", "55107-7"); - ValidationXML.equalIC(errors, RADErrorEnum.INFO_AGG_CODE_SYSTEM, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Informazioni_aggiuntive'] > code", "codeSystem", "2.16.840.1.113883.6.1"); - ValidationXML.equalIC(errors, RADErrorEnum.INFO_AGG_CODE_SYSTEM_NAME, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Informazioni_aggiuntive'] > code", "codeSystemName", "LOINC"); - ValidationXML.equalIC(errors, RADErrorEnum.INFO_AGG_CODE_DISPLAY_NAME, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Informazioni_aggiuntive'] > code", "displayName", "Appendice"); - } - - - - private static void referto(String xml, List errors) { - ValidationXML.equalIC(errors, RADErrorEnum.REFERTO_CODE, xml, "ClinicAlDocument > component > structuredBody > component > section[ID='Referto'] > code", "code", "18782-3"); - ValidationXML.equalIC(errors, RADErrorEnum.REFERTO_CODE_SYSTEM, xml, "ClinicAlDocument > component > structuredBody > component > section[ID='Referto'] > code", "codeSystem", "2.16.840.1.113883.6.1"); - ValidationXML.equalIC(errors, RADErrorEnum.REFERTO_CODE_SYSTEM_NAME, xml, "ClinicAlDocument > component > structuredBody > component > section[ID='Referto'] > code", "codeSystemName", "LOINC"); - ValidationXML.equalIC(errors, RADErrorEnum.REFERTO_DISPLAY_NAME, xml, "ClinicAlDocument > component > structuredBody > component > section[ID='Referto'] > code", "displayName", "Rilievo - Radiologia"); - } + ValidationXML.equalIC(errors, RADErrorEnum.T016, xml, "ClinicalDocument > component > structuredBody > component > section[ID=DICOM_Object_Catalog] > code", "code", "121181"); + ValidationXML.equalIC(errors, RADErrorEnum.T017, xml, "ClinicalDocument > component > structuredBody > component > section[ID=DICOM_Object_Catalog] > code", "codeSystem", "1.2.840.10008.2.16.4"); + ValidationXML.equalIC(errors, RADErrorEnum.T018, xml, "ClinicalDocument > component > structuredBody > component > section[ID=DICOM_Object_Catalog] > code", "codeSystemName", "DCM"); + ValidationXML.equalIC(errors, RADErrorEnum.T019, xml, "ClinicalDocument > component > structuredBody > component > section[ID=DICOM_Object_Catalog] > code", "displayName", "DICOM Object Catalog"); + ValidationXML.equalIC(errors, RADErrorEnum.T020, xml, "ClinicalDocument > component > structuredBody > component > section[ID=Quesito_diagnostico] > code", "code", "18785-6"); + ValidationXML.equalIC(errors, RADErrorEnum.T021, xml, "ClinicalDocument > component > structuredBody > component > section[ID=Quesito_diagnostico] > code", "codeSystem", "2.16.840.1.113883.6.1"); + ValidationXML.equalIC(errors, RADErrorEnum.T022, xml, "ClinicalDocument > component > structuredBody > component > section[ID=Quesito_diagnostico] > code", "codeSystemName", "LOINC"); + ValidationXML.equalIC(errors, RADErrorEnum.T023, xml, "ClinicalDocument > component > structuredBody > component > section[ID=Quesito_diagnostico] > code", "displayName", "Motivo per lo studio - Radiologia"); + ValidationXML.equalIC(errors, RADErrorEnum.T024, xml, "ClinicalDocument > component > structuredBody > component > section[ID=Quesito_diagnostico] > entry > observation", "moodCode", "EVN"); + ValidationXML.equalIC(errors, RADErrorEnum.T025, xml, "ClinicalDocument > component > structuredBody > component > section[ID=Quesito_diagnostico] > entry > observation > code", "code", "29308-4"); + ValidationXML.equalIC(errors, RADErrorEnum.T026, xml, "ClinicalDocument > component > structuredBody > component > section[ID=Quesito_diagnostico] > entry > observation > code", "codeSystem", "2.16.840.1.113883.6.1"); + ValidationXML.equalIC(errors, RADErrorEnum.T027, xml, "ClinicalDocument > component > structuredBody > component > section[ID=Quesito_diagnostico] > entry > observation > code", "codeSystemName", "LOINC"); + ValidationXML.equalIC(errors, RADErrorEnum.T028, xml, "ClinicalDocument > component > structuredBody > component > section[ID=Quesito_diagnostico] > entry > observation > code", "displayName", "Diagnosi"); + ValidationXML.equalIC(errors, RADErrorEnum.T029, xml, "ClinicalDocument > component > structuredBody > component > section[ID=Quesito_diagnostico] > entry > observation > value", "codeSystem", "2.16.840.1.113883.6.103"); + ValidationXML.equalIC(errors, RADErrorEnum.T030, xml, "ClinicalDocument > component > structuredBody > component > section[ID=Quesito_diagnostico] > entry > observation > value", "codeSystemName", "ICD9CM"); + ValidationXML.equalIC(errors, RADErrorEnum.T031, xml, "ClinicalDocument > component > structuredBody > component > section[ID=Storia_Clinica] > code", "code", "11329-0"); + ValidationXML.equalIC(errors, RADErrorEnum.T032, xml, "ClinicalDocument > component > structuredBody > component > section[ID=Storia_Clinica] > code", "codeSystem", "2.16.840.1.113883.6.1"); + ValidationXML.equalIC(errors, RADErrorEnum.T033, xml, "ClinicalDocument > component > structuredBody > component > section[ID=Storia_Clinica] > code", "codeSystemName", "LOINC"); + ValidationXML.equalIC(errors, RADErrorEnum.T034, xml, "ClinicalDocument > component > structuredBody > component > section[ID=Storia_Clinica] > code", "displayName", "Storia Generale"); + ValidationXML.equalIC(errors, RADErrorEnum.T035, xml, "ClinicalDocument > component > structuredBody > component > section[ID=Storia_Clinica] > entry > observation", "moodCode", "EVN"); + ValidationXML.equalIC(errors, RADErrorEnum.T036, xml, "ClinicalDocument > component > structuredBody > component > section[ID=Complicanze] > entry > observation > code", "code", "75326-9"); + ValidationXML.equalIC(errors, RADErrorEnum.T037, xml, "ClinicalDocument > component > structuredBody > component > section[ID=Complicanze] > entry > observation > code", "codeSystem", "2.16.840.1.113883.6.1"); + ValidationXML.equalIC(errors, RADErrorEnum.T038, xml, "ClinicalDocument > component > structuredBody > component > section[ID=Suggerimenti_per_il_medico_prescrittore] > code", "code", "18783-1"); + ValidationXML.equalIC(errors, RADErrorEnum.T039, xml, "ClinicalDocument > component > structuredBody > component > section[ID=Suggerimenti_per_il_medico_prescrittore] > code", "codeSystem", "2.16.840.1.113883.6.1"); + ValidationXML.equalIC(errors, RADErrorEnum.T040, xml, "ClinicalDocument > component > structuredBody > component > section[ID=Suggerimenti_per_il_medico_prescrittore] > code", "codeSystemName", "LOINC"); + ValidationXML.equalIC(errors, RADErrorEnum.T041, xml, "ClinicalDocument > component > structuredBody > component > section[ID=Suggerimenti_per_il_medico_prescrittore] > code", "displayName", "Raccomandazione studio - Radiologia"); - private static void esameEseguito(String xml, List errors) { - ValidationXML.equalIC(errors, RADErrorEnum.ESAME_ESEGUITO_CODE, xml, "ClinicAlDocument > component > structuredBody > component > section[ID='Esame_eseguito'] > code", "code", "55111-9"); - ValidationXML.equalIC(errors, RADErrorEnum.ESAME_ESEGUITO_CODE_SYSTEM, xml, "ClinicAlDocument > component > structuredBody > component > section[ID='Esame_eseguito'] > code", "codeSystem", "2.16.840.1.113883.6.1"); - ValidationXML.equalIC(errors, RADErrorEnum.ESAME_ESEGUITO_CODE_SYSTEM_NAME, xml, "ClinicAlDocument > component > structuredBody > component > section[ID='Esame_eseguito'] > code", "codeSystemName", "LOINC"); - ValidationXML.equalIC(errors, RADErrorEnum.ESAME_ESEGUITO_DISPLAY_NAME, xml, "ClinicAlDocument > component > structuredBody > component > section[ID='Esame_eseguito'] > code", "displayName", "Descrizioni attuale procedure di imaging"); - ValidationXML.equalIC(errors, RADErrorEnum.ESAME_ESEGUITO_MOOD_CODE, xml, "ClinicAlDocument > component > structuredBody > component > section[ID='Esame_eseguito'] > entry > act", "moodCode", "EVN"); - ValidationXML.equalIC(errors, RADErrorEnum.ESAME_ESEGUITO_CLASS_CODE, xml, "ClinicAlDocument > component > structuredBody > component > section[ID='Esame_eseguito'] > entry > act", "classCode", "ACT"); - ValidationXML.hasDateFormat(errors, RADErrorEnum.ESAME_ESEGUITO_EFFECTIVE_TIME, xml, "ClinicAlDocument > component > structuredBody > component > section[ID='Esame_eseguito'] > entry > act > effectiveTime", "value"); - } - - - private static void conclusioni(String xml, List errors) { - ValidationXML.equalIC(errors, RADErrorEnum.CONCLUSIONI_CODE, xml, "ClinicAlDocument > component > structuredBody > component > section[ID='Conclusioni'] > code", "code", "55110-1"); - ValidationXML.equalIC(errors, RADErrorEnum.CONCLUSIONI_CODE_SYSTEM, xml, "ClinicAlDocument > component > structuredBody > component > section[ID='Conclusioni'] > code", "codeSystem", "2.16.840.1.113883.6.1"); - ValidationXML.equalIC(errors, RADErrorEnum.CONCLUSIONI_CODE_SYSTEM_NAME, xml, "ClinicAlDocument > component > structuredBody > component > section[ID='Conclusioni'] > code", "codeSystemName", "LOINC"); - ValidationXML.equalIC(errors, RADErrorEnum.CONCLUSIONI_DISPLAY_NAME, xml, "ClinicAlDocument > component > structuredBody > component > section[ID='Conclusioni'] > code", "displayName", "Conclusioni"); - } - - private static void storiaV1(String xml, List errors) { - ValidationXML.equalIC(errors, RADErrorEnum.STORIA_CODE, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > code", "code", "11329-0"); - ValidationXML.equalIC(errors, RADErrorEnum.STORIA_CODE_SYSTEM, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > code", "codeSystem", "2.16.840.1.113883.6.1"); - ValidationXML.equalIC(errors, RADErrorEnum.STORIA_CODE_SYSTEM_NAME, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > code", "codeSystemName", "LOINC"); - ValidationXML.equalIC(errors, RADErrorEnum.STORIA_CODE_DISPLAY_NAME, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > code", "displayName", "Storia Generale"); - ValidationXML.equalIC(errors, RADErrorEnum.STORIA_OBS_MOOD_CODE, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > entry > observation", "moodCode", "EVN"); - ValidationXML.equalIC(errors, RADErrorEnum.STORIA_OBS_CLASS_CODE, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > entry > observation", "classCode", "OBS"); - ValidationXML.containsIC(errors, RADErrorEnum.STORIA_OBS_CODE, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > entry > observation > entryRelationship > observation > code", "code", "89261-2", "33999-4"); - ValidationXML.containsIC(errors, RADErrorEnum.STORIA_OBS_CODE_SYSTEM, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > entry > observation > entryRelationship > observation > code", "codeSystem", "2.16.840.1.113883.6.1"); - ValidationXML.containsIC(errors, RADErrorEnum.STORIA_OBS_CODE_SYSTEM_NAME, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > entry > observation > entryRelationship > observation > code", "codeSystemName", "LOINC"); - ValidationXML.containsIC(errors, RADErrorEnum.STORIA_OBS_DISPLAY_NAME, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > entry > observation > entryRelationship > observation > code", "displayName", "Decorso Clinico", "Stato"); - ValidationXML.equalIC(errors, RADErrorEnum.STORIA_ORG_MOOD_CODE, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > entry > organizer", "moodCode", "EVN"); - ValidationXML.equalIC(errors, RADErrorEnum.STORIA_ORG_CLASS_CODE, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > entry > organizer", "classCode", "CLUSTER"); - ValidationXML.equalIC(errors, RADErrorEnum.STORIA_ORG_CODE, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > entry > organizer > code", "code", "10157-6"); - ValidationXML.equalIC(errors, RADErrorEnum.STORIA_ORG_CODE_SYSTEM, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > entry > organizer > code", "codeSystem", "2.16.840.1.113883.6.1"); - ValidationXML.equalIC(errors, RADErrorEnum.STORIA_ORG_STATUS_CODE, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > entry > organizer > statusCode", "code", "completed"); - ValidationXML.equalIC(errors, RADErrorEnum.STORIA_ORG_REL_CLASS_CODE, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > entry > organizer > subject > relatedSubject", "classcode", "PRS"); - ValidationXML.equalIC(errors, RADErrorEnum.STORIA_ORG_REL_SUB_GEN, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > entry > organizer > subject > relatedSubject > subject > administrativeGenderCode", "code","M", "F", "UN"); - ValidationXML.equalIC(errors, RADErrorEnum.STORIA_ORG_OBS_VALUE_TYPE, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > entry > organizer > component > observation > value", "xsi:type", "CD"); - ValidationXML.equalIC(errors, RADErrorEnum.STORIA_ORG_OBS_VALUE_CODE_SYSTEM, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > entry > organizer > component > observation > value", "codeSystem", "2.16.840.1.113883.6.103"); - ValidationXML.containsIC(errors, RADErrorEnum.STORIA_ORG_OBS_CLASS_CODE, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > entry > organizer > component > observation > entryRelationship > observation", "classCode", "OBS"); - ValidationXML.containsIC(errors, RADErrorEnum.STORIA_ORG_OBS_MOOD_CODE, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > entry > organizer > component > observation > entryRelationship > observation", "moodCode", "EVN"); - ValidationXML.equalIC(errors, RADErrorEnum.STORIA_ALLERGIE_CODE, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > component > section[ID='Allergie'] > code", "code", "48765-2"); - ValidationXML.equalIC(errors, RADErrorEnum.STORIA_ALLERGIE_CODE_SYSTEM, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > component > section[ID='Allergie'] > code", "codeSystem", "2.16.840.1.113883.6.1"); - ValidationXML.equalIC(errors, RADErrorEnum.STORIA_ALLERGIE_CODE_SYSTEM_NAME, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > component > section[ID='Allergie'] > code", "codeSystemName", "LOINC"); - ValidationXML.equalIC(errors, RADErrorEnum.STORIA_ALLERGIE_CODE_DISPLAY_NAME, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > component > section[ID='Allergie'] > code", "displayName", "Allergie e/o reazioni avverse"); - ValidationXML.containsIC(errors, RADErrorEnum.STORIA_ALLERGIE_ACT_OBS_CODE, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > component > section[ID='Allergie'] > entry > act > entryRelationship > observation > code", "code", "52473-6"); - ValidationXML.containsIC(errors, RADErrorEnum.STORIA_ALLERGIE_ACT_OBS_CODE_SYSTEM, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > component > section[ID='Allergie'] > entry > act > entryRelationship > observation > code", "codeSystem", "2.16.840.1.113883.6.1"); - ValidationXML.containsIC(errors, RADErrorEnum.STORIA_ALLERGIE_ACT_OBS_DISPLAY_NAME, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > component > section[ID='Allergie'] > entry > act > entryRelationship > observation > code", "displayName", "Allergia o causa della reazione"); - ValidationXML.containsIC(errors, RADErrorEnum.STORIA_ALLERGIE_ACT_OBS_STATUS_CODE, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > component > section[ID='Allergie'] > entry > act > entryRelationship > observation > statusCode", "code", "completed"); - ValidationXML.equalIC(errors, RADErrorEnum.STORIA_ALLERGIE_ACT_OBS_VALUE_CODE, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > component > section[ID='Allergie'] > entry > act > entryRelationship > observation > value", "codeSystem", true, "2.16.840.1.113883.5.4"); - ValidationXML.containsIC(errors, RADErrorEnum.STORIA_ALLERGIE_ACT_OBS_OBS_CODE, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > component > section[ID='Allergie'] > entry > act > entryRelationship > observation > entryRelationship > observation > code", "code", "75321-0", "5321-0", "SEV", "33999-4"); - ValidationXML.containsIC(errors, RADErrorEnum.STORIA_ALLERGIE_ACT_OBS_OBS_CODE_SYSTEM, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > component > section[ID='Allergie'] > entry > act > entryRelationship > observation > entryRelationship > observation > code", "codeSystem", "2.16.840.1.113883.6.1", "2.16.840.1.113883.5.4"); - ValidationXML.containsIC(errors, RADErrorEnum.STORIA_ALLERGIE_ACT_OBS_OBS_CODE_SYSTEM_NAME, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > component > section[ID='Allergie'] > entry > act > entryRelationship > observation > entryRelationship > observation > code", "codeSystemName", "LOINC", "ActCode"); - ValidationXML.containsIC(errors, RADErrorEnum.STORIA_ALLERGIE_ACT_OBS_OBS_DISPLAY_NAME, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > component > section[ID='Allergie'] > entry > act > entryRelationship > observation > entryRelationship > observation > code", "displayName" , "Obiettività Clinica", "Clinical Finding", "Criticality", "Stato"); - ValidationXML.containsIC(errors, RADErrorEnum.STORIA_ALLERGIE_ACT_OBS_OBS_STATUS_CODE, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > component > section[ID='Allergie'] > entry > act > entryRelationship > observation > entryRelationship > observation > statusCode", "code", "completed"); - ValidationXML.containsIC(errors, RADErrorEnum.STORIA_ALLERGIE_ACT_OBS_ACT_CODE, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > component > section[ID='Allergie'] > entry > act > entryRelationship > observation > entryRelationship > act > code", "code", "48767-8"); - ValidationXML.containsIC(errors, RADErrorEnum.STORIA_ALLERGIE_ACT_OBS_ACT_CODE_SYSTEM, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > component > section[ID='Allergie'] > entry > act > entryRelationship > observation > entryRelationship > act > code", "codeSystem", "2.16.840.1.113883.6.1"); - ValidationXML.containsIC(errors, RADErrorEnum.STORIA_ALLERGIE_ACT_OBS_ACT_CODE_SYSTEM_NAME, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > component > section[ID='Allergie'] > entry > act > entryRelationship > observation > entryRelationship > act > code", "codeSystemName", "LOINC"); - ValidationXML.containsIC(errors, RADErrorEnum.STORIA_ALLERGIE_ACT_OBS_ACT_DISPLAY_NAME, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > component > section[ID='Allergie'] > entry > act > entryRelationship > observation > entryRelationship > act > code", "displayName", "Annotation comment"); - ValidationXML.containsIC(errors, RADErrorEnum.STORIA_ALLERGIE_ACT_OBS_ACT_STATUS, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Storia_Clinica'] > component > section[ID='Allergie'] > entry > act > entryRelationship > observation > entryRelationship > act > statusCode", "code" , "completed"); - } - - private static void precedentiEsami(String xml, List errors) { - ValidationXML.equalIC(errors, RADErrorEnum.ESAMI_CODE, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Precedenti_esami_eseguiti'] > code", "code", "55114-3"); - ValidationXML.equalIC(errors, RADErrorEnum.ESAMI_CODE_SYSTEM, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Precedenti_esami_eseguiti'] > code", "codeSystem", "2.16.840.1.113883.6.1"); - ValidationXML.equalIC(errors, RADErrorEnum.ESAMI_CODE_SYSTEM_NAME, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Precedenti_esami_eseguiti'] > code", "codeSystemName", "LOINC"); - ValidationXML.equalIC(errors, RADErrorEnum.ESAMI_DISPLAY_NAME, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Precedenti_esami_eseguiti'] > code", "displayName", "Precedente procedura di imaging, descrizioni"); - ValidationXML.equalIC(errors, RADErrorEnum.ESAMI_OBS_MOOD_CODE, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Precedenti_esami_eseguiti'] > entry > observation", "moodCode", "EVN"); - ValidationXML.equalIC(errors, RADErrorEnum.ESAMI_OBS_CLASS_CODE, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Precedenti_esami_eseguiti'] > entry > observation", "classCode", "OBS"); - ValidationXML.hasDateFormat(errors, RADErrorEnum.ESAMI_OBS_EFF_TIME_LOW, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Precedenti_esami_eseguiti'] > entry > observation > effectiveTime > low", "value"); - ValidationXML.hasDateFormat(errors, RADErrorEnum.ESAMI_OBS_EFF_TIME_HIGH, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Precedenti_esami_eseguiti'] > entry > observation > effectiveTime > high", "value"); - } - - private static void quesito(String xml, List errors) { - ValidationXML.equalIC(errors, RADErrorEnum.QUESITO_CODE, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Quesito_diagnostico'] > code", "code", "18785-6"); - ValidationXML.equalIC(errors, RADErrorEnum.QUESITO_CODE_SYSTEM, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Quesito_diagnostico'] > code", "codeSystem", "2.16.840.1.113883.6.1"); - ValidationXML.equalIC(errors, RADErrorEnum.QUESITO_CODE_SYSTEM_NAME, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Quesito_diagnostico'] > code", "codeSystemName", "LOINC"); - ValidationXML.equalIC(errors, RADErrorEnum.QUESITO_DISPLAY_NAME, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Quesito_diagnostico'] > code", "displayName", "Motivo per lo studio - Radiologia"); - ValidationXML.equalIC(errors, RADErrorEnum.QUESITO_OBS_MOOD_CODE, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Quesito_diagnostico'] > entry > observation", "moodCode", "EVN"); - ValidationXML.equalIC(errors, RADErrorEnum.QUESITO_OBS_CLASS_CODE, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Quesito_diagnostico'] > entry > observation", "classCode", "OBS"); - ValidationXML.equalIC(errors, RADErrorEnum.QUESITO_OBS_CODE, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Quesito_diagnostico'] > entry > observation > code", "code", "29308-4"); - ValidationXML.equalIC(errors, RADErrorEnum.QUESITO_OBS_CODE_SYSTEM, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Quesito_diagnostico'] > entry > observation > code", "codeSystem", "2.16.840.1.113883.6.1"); - ValidationXML.equalIC(errors, RADErrorEnum.QUESITO_OBS_CODE_SYSTEM_NAME, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Quesito_diagnostico'] > entry > observation > code", "codeSystemName", "LOINC"); - ValidationXML.equalIC(errors, RADErrorEnum.QUESITO_OBS_DISPLAY_NAME, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Quesito_diagnostico'] > entry > observation > code", "displayName", "Diagnosi"); - ValidationXML.equalIC(errors, RADErrorEnum.QUESITO_OBS_VALUE_CODE_SYSTEM, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Quesito_diagnostico'] > entry > observation > value", "codeSystem", "2.16.840.1.113883.6.103"); - ValidationXML.equalIC(errors, RADErrorEnum.QUESITO_OBS_VALUE_CODE_SYSTEM_NAME, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Quesito_diagnostico'] > entry > observation > value", "codeSystemName", "ICD9CM"); - } - - private static void dicom(String xml, List errors) { - ValidationXML.equalIC(errors, RADErrorEnum.DICOM_CODE, xml, "ClinicalDocument > component > structuredBody > component > section[ID='DICOM_Object_Catalog'] > code", "code", "121181"); - ValidationXML.equalIC(errors, RADErrorEnum.DICOM_CODE_SYSTEM, xml, "ClinicalDocument > component > structuredBody > component > section[ID='DICOM_Object_Catalog'] > code", "codeSystem", "1.2.840.10008.2.16.4"); - ValidationXML.equalIC(errors, RADErrorEnum.DICOM_CODE_SYSTEM_NAME, xml, "ClinicalDocument > component > structuredBody > component > section[ID='DICOM_Object_Catalog'] > code", "codeSystemName", "DCM"); - ValidationXML.equalIC(errors, RADErrorEnum.DICOM_DISPLAY_NAME, xml, "ClinicalDocument > component > structuredBody > component > section[ID='DICOM_Object_Catalog'] > code", "displayName", "DICOM Object Catalog"); - } - - private static void suggerimenti(String xml, List errors) { - ValidationXML.equalIC(errors, RADErrorEnum.SUGGERIMENTI_CODE, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Suggerimenti_per_il_medico_prescrittore'] > code", "code", "18783-1"); - ValidationXML.equalIC(errors, RADErrorEnum.SUGGERIMENTI_CODE_SYSTEM, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Suggerimenti_per_il_medico_prescrittore'] > code", "codeSystem", "2.16.840.1.113883.6.1"); - ValidationXML.equalIC(errors, RADErrorEnum.SUGGERIMENTI_CODE_SYSTEM_NAME, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Suggerimenti_per_il_medico_prescrittore'] > code", "codeSystemName", "LOINC"); - ValidationXML.equalIC(errors, RADErrorEnum.SUGGERIMENTI_CODE_DISPLAY_NAME, xml, "ClinicalDocument > component > structuredBody > component > section[ID='Suggerimenti_per_il_medico_prescrittore'] > code", "displayName", "Raccomandazione studio - Radiologia"); + return errors; } - -} - + +} \ No newline at end of file