Skip to content

Commit 2c8f195

Browse files
authored
MEX-668: Inconsistent mappings on the CES-CI server (#155)
1 parent 4112e82 commit 2c8f195

File tree

6 files changed

+44
-11
lines changed

6 files changed

+44
-11
lines changed

configuration/concepts/diagnoses-covid.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ bf96c5a3-7031-41de-b245-1a6637a61292,,COVID-19 diagnósticos,COVID-19 diagnosis
1313
3cf1898e-26fe-102b-80cb-0017a47871b2,,Fiebre,Fever,,Abnormally high body temperature.,Symptom/Finding,N/A,,FEVER,5945,140238,,R50.9,,,,,386661006,,,
1414
3cd4c100-26fe-102b-80cb-0017a47871b2,,Fiebre con escalofríos,Fever with chills,,"A sensation of feeling cold in the body often associated with an abnormal elevation of body temperature, usually as a result of a pathologic process.",Symptom,N/A,,CHILLS,871,140237,,,R50.8,,,,274640006,,,
1515
165913AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,,Gastroenteritis debido a COVID-19,Gastroenteritis due to severe acute respiratory syndrome coronavirus 2 (SARS-CoV-2),,,Diagnosis,N/A,,,12873,165913,,,U07.1,A08.3,,,,111843007;840539006,,
16-
165866AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,,Historia de COVID-19,History of severe acute respiratory syndrome coronavirus 2 (SARS-CoV-2) disease,History of disease due to SARS-CoV-2,,Diagnosis,Coded,No;Yes;Unknown,,13772,,,,U08.9,,QC42/RA01.1,,,2.92508471000119E+017,,
16+
165866AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,,Historia de COVID-19,History of severe acute respiratory syndrome coronavirus 2 (SARS-CoV-2) disease,History of disease due to SARS-CoV-2,,Diagnosis,Coded,No;Yes;Unknown,,13772,,,U08.9,,,QC42/RA01.1,,,2.92508471000119E+017,,
1717
165912AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,,Infección asintomática confirmada por COVID-19,Asymptomatic confirmed infection with severe acute respiratory syndrome coronavirus 2 (SARS-CoV-2),Asymptomatic COVID-19,,Diagnosis,N/A,,,12872,165912,,,U07.1,,,,,840539006,,
1818
165609AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,,Infección debida a COVID-19,Infection due to severe acute respiratory syndrome coronavirus 2 (SARS-CoV-2),,,Diagnosis,N/A,,,12799,165609,,,U07.1,B34.2,,,,186747009;840539006,,
1919
165633AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,,Infección del tracto respiratorio superior debida a COVID-19,Upper respiratory tract infection due to severe acute respiratory syndrome coronavirus 2 (SARS-CoV-2),,,Diagnosis,N/A,,,12812,165633,,,J06.9,B97.2;U07.1,,,,840539006;54150009,1240541000000107,

configuration/concepts/diagnoses-mch.csv

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ b229b3a6-54a6-41c0-9366-239d39f3d218,,Aborto medico,Medical abortion,Generally P
55
816222a9-465a-4f18-bf01-2f38c8982e18,,Anemia en el embarazo,"Anemia of Mother, Complicating Pregnancy, Childbirth, or the Puerperium, Unspecified as to Episode of Care",Diluted concentration of red blood cells due to pregnancy,Diagnosis,N/A,ANEMIA OF PREGNANCY,3703,,,O99.0,,5a (Anemia in Pregnancy ),,,
66
113814AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,,antecedente de: cesárea,"Previous Cesarean Delivery, Unspecified as to Episode of Care or not Applicable cesarean delivery",,Diagnosis,N/A,,13528,113814,,O34.2,,,,161805006,
77
121519AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,,apnea en el recién nacido,Apnea of newborn,A transient absence of spontaneous respiration.,Diagnosis,N/A,,9450,121519,,P28.4,,,,13094009,
8-
157460AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,,Atención de embarazo con historia de insuficiente atención prenatal,late prenatal care complicating pregnancy,,Diagnosis,N/A,,14097,157460,,Z35.3,,,,426403007,
8+
157460AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,,Atención de embarazo con historia de insuficiente atención prenatal,late prenatal care complicating pregnancy,,Diagnosis,N/A,,14097,157460,,Z35.3,,,,,426403007
99
150797AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,,aumento anormal de peso durante el embarazo,Abnormal Weight Gain in Pregnancy,,Diagnosis,N/A,,14092,150797,O26.0,,,,,237288003,
10-
136784AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,,aumento de peso insuficiente en el embarazo,Insufficient weight gain of pregnancy,,Diagnosis,N/A,,14093,136784,O26.1,,,,,28701003,
10+
136784AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,,aumento de peso insuficiente en el embarazo,Insufficient weight gain of pregnancy,,Diagnosis,N/A,,14093,136784,,O26.1,,,,28701003,
1111
116222AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,,bajo peso al nacer,Low Birth Weight,,Diagnosis,N/A,,13545,116222,,P07.1,,,,276610007,
1212
05b51ca4-cf16-4f1c-94db-eecb9125773c,,Consejería de concepción,Conception counseling,,Diagnosis,N/A,,14099,,Z31.6,,,,,,
1313
42ce6824-84a3-4eef-9f0b-77455439eb1d,,Consejería en sexualidad,Counseling on sexuality,"Counseling related to combined concerns regarding sexual attitude, behavior and orientation",Diagnosis,N/A,,14100,,Z70.3,,,,,,
@@ -19,7 +19,7 @@ a12c8950-6ab0-4198-9f0a-f270010ea459,,Dificultad respiratoria del recién nacido
1919
134006AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,,Embarazo molar,Molar pregnancy,"A trophoblastic disease characterized by hydrops of the mesenchymal portion of the villus. Its karyotype is paternal and usually homozygotic. The tumor is indistinguishable from chorioadenoma destruens or invasive mole ( = HYDATIDIFORM MOLE, INVASIVE) except by karyotype. There is no apparent relation by karyotype to CHORIOCARCINOMA. Hydatidiform refers to the presence of the hydropic state of some or all of the villi (Greek hydatis, a drop of water).",Diagnosis,N/A,,14098,134006,,O01.9,,,,44782008,
2020
123572AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,,embarazo no deseado,Unwanted pregnancy,The pregnancy is not wanted by one or both parents.,Diagnosis,N/A,,14094,123572,,,Z64.0,,,58532003,
2121
113600AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,,Embarazo postérmino,Post term pregnancy,"Pregnancy continuing beyond the normal duration; in humans, usually beyond 294 days after the beginning of the last menses. (From Dorland, 27th ed)",Diagnosis,N/A,,12057,113600,,O48,,,,90968009,
22-
123841AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,,hemorragia umbilical después del nacimiento,Umbilical Hemorrhage After Birth,,Diagnosis,N/A,Umbilical Hemorrhage After Birth,7239,123841,,P51.9,,,,82986004,
22+
123841AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,,hemorragia umbilical después del nacimiento,Umbilical Hemorrhage After Birth,,Diagnosis,N/A,Umbilical Hemorrhage After Birth,7239,123841,P51.9,,,,,82986004,
2323
113859AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,,Hipertensión gestacional,Pregnancy-induced hypertension,,Diagnosis,N/A,,9752,113859,,,O13,,33 (Hypertension),48194001,
2424
127459AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,,Incompatibilidad Rh que afecta al embarazo,Rhesus isoimmunization unspecified,"The process by which fetal Rh+ erythrocytes enter the circulation of an Rh- mother during delivery, causing her to produce IgG antibodies, which can cross the placenta and destroy the erythrocytes of Rh- fetuses in subsequent pregnancies.",Diagnosis,N/A,,13633,127459,,O36.0,,,,44795003,
2525
140951AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,,macrosomía fetal,Exceptionally large baby,"A newborn who is significantly larger than average; has a birth weight of more than 8 pounds, 13 ounces (4,000 grams), regardless of his or her gestational age.",Diagnosis,N/A,,13540,140951,P08.0,,,,,276613009,38206000;268818009

configuration/concepts/diagnoses-mental-health.csv

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ f6ce8b05-d0e2-4f51-97b0-42e32d585db5,,México conjunto de diagnósticos de salud
1111
127132AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,,Trastorno esquizoafectivo,Schizoaffective Disorder,,Diagnosis,N/A,,,127132,F25.9,,,,68890003,
1212
149514AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,,Trastorno por estrés agudo,Acute Stress Reaction,,Diagnosis,N/A,Acute Stress Reaction,7950,149514,,F43.0,,44 (Anxiety disorder),,67195008
1313
489db96c-ef65-40d2-a96b-a2f0c59645fb,,Trastorno psicosomático,Psychosomatic disorder,Psychosomatic means mind (psyche) and body (soma). A psychosomatic disorder is a disease which involves both mind and body. Some physical diseases are thought to be particularly prone to be made worse by mental factors such as stress and anxiety.,Diagnosis,N/A,Psychosomatic problems,7198,,F45.9,,,,,
14-
121317AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,,Trastorno por déficit de atención e hiperactividad,Attention deficit disorder with hyperactivity,,Diagnosis,N/A,,,121317,F90.0,,,,406506008,
14+
121317AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,,Trastorno por déficit de atención e hiperactividad,Attention deficit disorder with hyperactivity,,Diagnosis,N/A,,,121317,,F90.0,,,406506008,
1515
113146AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,,Trastorno esquizofreniforme,Schizophreniform disorder,,Diagnosis,N/A,,,113146,,,F23.2,,88975006,
16-
112603AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,,Trastorno por uso de sustancias,Substance abuse disorder,,Diagnosis,Coded,,12415,112603,,,F19.1,,6621407,
16+
112603AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,,Trastorno por uso de sustancias,Substance abuse disorder,,Diagnosis,Coded,,12415,112603,,F19.1,,,6621407,

configuration/concepts/diagnoses-primary-care.csv

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ ac764401-a34a-4a29-b886-43053a9f6e35,,Amputación,,Amputation,,Removal of a part
4646
161896AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,,Atencion paliativa,,Encounter for palliative care,,,Diagnosis,N/A,,,8929,161896,,,,Z51.5,,,,,,,,,441874000,
4747
121102AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,,Blefaritis,,Blepharitis,,Inflammation of the eyelids.,Diagnosis,N/A,,,12229,121102,,,H01.0,,,,,,,,,41446000,,
4848
3ccd1ee6-26fe-102b-80cb-0017a47871b2,,Bocio,,Goiter,,"A noncancerous enlargement of the thyroid gland, visible as a swelling at the front of the neck, that is often associated with iodine deficiency.",Diagnosis,N/A,,GOITER,133,,,,,E04.9,,,,,,,,3716002,,
49-
3cd4e7e8-26fe-102b-80cb-0017a47871b2,,Bordetella pertusis,,Pertussis,,An infectious disease especially of children caused by a bacterium of the genus Bordetella (B. pertussis) and marked by a convulsive spasmodic cough sometimes followed by a crowing intake of breath.,Diagnosis,N/A,,PERTUSSIS,891,,,,,A37.9,,,,22 (Whooping Cough),,,,,,
49+
3cd4e7e8-26fe-102b-80cb-0017a47871b2,,Bordetella pertusis,,Pertussis,,An infectious disease especially of children caused by a bacterium of the genus Bordetella (B. pertussis) and marked by a convulsive spasmodic cough sometimes followed by a crowing intake of breath.,Diagnosis,N/A,,PERTUSSIS,891,,,,A37.9,,,,,22 (Whooping Cough),,,,,,
5050
3ccd40ce-26fe-102b-80cb-0017a47871b2,,Bronquitis,,Bronchitis,,"Inflammation of the bronchial tubes, usually with cough.",Diagnosis,N/A,,BRONCHITIS,147,,,,,J40,,,,,6 (ARI),,,,,
5151
3ccc57ae-26fe-102b-80cb-0017a47871b2,,Bronquitis aguda,,"Bronchitis, Acute",,"Lower respiratory infection of the bronchial tubes, acute.",Diagnosis,N/A,,Acute brochitis,10,,,,,J20.9,,,,6 (ARI),,,,,,
5252
120669AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,,bronquitis crónica,,Chronic Bronchitis,,,Diagnosis,N/A,,Chronic Bronchitis,7610,120669,,,,J42,,,,,,,,63480004,,
@@ -132,7 +132,7 @@ aafca29e-a395-4638-9e27-2cddc7ed9146,,Diarrea aguda,,Acute Diarrhea,,Frequent an
132132
19f08bdd-7528-47ef-a060-b531f73024e7,,Diarrea viral,,Viral and other specified intestinal infections,,,Diagnosis,N/A,,Viral and other specified intestinal infections,7156,,,,,A08.4,,,,,,,,,,
133133
125290AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,,Dientes supernumerarios,,Supernumerary Tooth,,"An extra tooth, erupted or unerupted, resembling or unlike the other teeth in the group to which it belongs. Its presence may cause malposition of adjacent teeth or prevent their eruption.",Diagnosis,N/A,,,8903,125290,,,K00.1,,,,,,,,,367534004,,
134134
142371AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,,dificultad para dormir,,Difficulty Sleeping,,,Diagnosis,N/A,,,11806,142371,,,G47.9,,,,,,,,,301345002,,
135-
119399AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,,difteria,,Diphtheria,,"A localized infection of mucous membranes or skin caused by toxigenic strains of CORYNEBACTERIUM DIPHTHERIAE. It is characterized by the presence of a pseudomembrane at the site of infection. DIPHTHERIA TOXIN, produced by C. diphtheriae, can cause myocarditis, polyneuritis, and other systemic toxic effects.",Diagnosis,N/A,,Diphtheria,7641,119399,,,,A36.9,,,,,,,,397428000,,
135+
119399AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,,difteria,,Diphtheria,,"A localized infection of mucous membranes or skin caused by toxigenic strains of CORYNEBACTERIUM DIPHTHERIAE. It is characterized by the presence of a pseudomembrane at the site of infection. DIPHTHERIA TOXIN, produced by C. diphtheriae, can cause myocarditis, polyneuritis, and other systemic toxic effects.",Diagnosis,N/A,,Diphtheria,7641,119399,,,A36.9,,,,,,,,,397428000,,
136136
141645AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,,disartria,,Dysarthria,,"Disorders of speech articulation caused by imperfect coordination of pharnyx, larnyx, tongue, or face muscles. This may result from CRANIAL NERVE DISEASES; NEUROMUSCULAR DISEASES; CEREBELLAR DISEASES; BASAL GANGLIA DISEASES; BRAIN STEM diseases; or diseases of the corticobulbar tracts (see PYRAMIDAL TRACTS). The cortical language centers are intact in this condition. (From Adams et al., Principles of Neurology, 6th ed, p489)",Diagnosis,N/A,,,10604,141645,,,,,R47.1,,,,,,,8011004,,
137137
122936AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,,discapacidad para caminar,,Walking disability,,,Diagnosis,N/A,,,10509,122936,,,,,R26.2,,,,,,,228158008,,
138138
141635AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,,disestesia,,Dysaesthesia,,"Subjective cutaneous sensations (e.g., cold, warmth, tingling, pressure, etc.) that are experienced spontaneously in the absence of stimulation.",Diagnosis,N/A,,,11215,141635,,,,R20.8,,,,,,,,279079003,,
@@ -299,7 +299,7 @@ e26d7578-8d90-40f8-9d34-895c6bc53bba,,Infección aguda de las vías respiratoria
299299
129285AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,,Infección postraumática de una herida,,Posttraumatic wound infection,,,Diagnosis,N/A,,,9616,129285,,,T79.3,,,,,,,,,111726004,269406001;212374003,
300300
137251AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,,infértil,,Infertile,,,Diagnosis,N/A,,,11410,137251,,,N97.9,,,,,,,,,8619003,,
301301
13ff96a3-7a34-409d-a96b-6fdc383c1443,,Influenza,,"Influenza, virus not identified",,a contagious respiratory illness caused by influenza viruses,Diagnosis,N/A,,INFLUENZA,3731,,,,,J11.1,,,,,,,,6142004,,
302-
3ccfb3b8-26fe-102b-80cb-0017a47871b2,,Inoxicación alimentaria,,"Toxicity, food",,poisoning (usually with GI effects) from ingestion of foodstuffs,Diagnosis,N/A,,TOXICITY FOOD,368,,,,,A05.9,,,,,,,,,,
302+
3ccfb3b8-26fe-102b-80cb-0017a47871b2,,Inoxicación alimentaria,,"Toxicity, food",,poisoning (usually with GI effects) from ingestion of foodstuffs,Diagnosis,N/A,,TOXICITY FOOD,368,,,,,,A05.9,,,,,,,,,
303303
116743AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,,insomnio,,Insomnia,,Sleep disorder associated with waking at night.,Diagnosis,N/A,,INSOMNIA,867,116743,867,,,G47.0,,,,,,,,193462001,,
304304
7018a636-4e28-4681-969d-9caf98178abb,,Insuficiencia hepática,,Liver failure,,,Diagnosis,N/A,,LIVER FAILURE,3682,117598,,,K72.9,,,,,,,,,59927004,,
305305
894f306e-a868-44b8-b580-93495e3cca4c,,Insuficiencia renal,,Renal failure,,,Diagnosis,N/A,,RENAL FAILURE,3681,,,,,N19,,,,,,,,,,
@@ -339,7 +339,7 @@ e26d7578-8d90-40f8-9d34-895c6bc53bba,,Infección aguda de las vías respiratoria
339339
144025AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,,malformaciones congénitas múltiples,,Multiple congenital anomalies,,,Diagnosis,N/A,,,9416,144025,,,,,Q89.7,,,,,,,116022009,,
340340
162313AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,,Mania con síntomas psicóticos,,Mania with psychotic symptoms,,,Diagnosis,N/A,,Mania with psychotic symptoms,9520,162313,,,,F30.2,,,,,45 (Mood disorder),,,,231494001,
341341
162314AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,,Mania sin síntomas psicóticos,,Mania without psychotic symptoms,,,Diagnosis,N/A,,Mania without psychotic symptoms,9518,162314,,,,F30.1,,,,,45 (Mood disorder),,,,231494001,
342-
3cde693a-26fe-102b-80cb-0017a47871b2,,Marasmo,,Marasmus,Marasmus,A type of malnutrition,Diagnosis,N/A,,MARASMUS,1818,,,,,E41,,,,,41 (Malnutrition),,,,,
342+
3cde693a-26fe-102b-80cb-0017a47871b2,,Marasmo,,Marasmus,Marasmus,A type of malnutrition,Diagnosis,N/A,,MARASMUS,1818,,,,E41,,,,,,41 (Malnutrition),,,,,
343343
3ccd029e-26fe-102b-80cb-0017a47871b2,,Mastitis,,Mastitis,,"Inflammation of the mammary gland, usually caused by infection.",Diagnosis,N/A,,MASTITIS,115,,,,,N61,,,,,,,,45198002,,
344344
118189AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,,Mastopatía fibroquística difusa,,Diffuse Cystic Mastopathy,,A chronic disorder comprising three variants which range from lesions consisting primarily of an overgrowth of fibrous tissue to those characterized by dominance of the proliferation of the epithelial parenchyma to a form of dysplasia characterized by both stromal and epithelial hyperplasia with the formation of cysts.,Diagnosis,N/A,,,8318,118189,,,N60.1,,,,,,,,,27431007,,
345345
145659AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,,melasma,,Chloasma,,Disorders of increased melanin pigmentation that develop without preceding inflammatory disease.,Diagnosis,N/A,,,10032,145659,,,L81.1,,,,,,,,,36209000,,

configuration/pih/liquibase/liquibase-mexico.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
</sql>
6767
</changeSet>
6868
<changeSet id="20231004-clean-up-bad-characters" author="mgoodrich">
69-
<comment>MEX-602: Cannot print prescription (clean up bad characters)</comment>
69+
<comment>MEX-602: Cannot print prescription (clean up bad characters)</comment>
7070
<sql>
7171
update drug set name = CONVERT(name USING latin1) where name != CONVERT(name USING latin1);
7272
</sql>
@@ -87,4 +87,8 @@
8787
</sql>
8888
</changeSet>-->
8989

90+
<changeSet id="20260225-clean-up-inconsistent-mappings" author="mgoodrich">
91+
<comment>MEX-668: Inconsistent mappings on the CES-CI server</comment>
92+
<sqlFile endDelimiter=";" path="sql/clean_up_inconsistent_mappings.sql" relativeToChangelogFile="true" stripComments="true" />
93+
</changeSet>
9094
</databaseChangeLog>
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
drop temporary table if exists tmp_mappings_to_cleanup;
2+
create temporary table tmp_mappings_to_cleanup
3+
as
4+
select map.concept_map_id
5+
from
6+
concept_reference_source source
7+
inner join concept_reference_term term on source.concept_source_id = term.concept_source_id
8+
inner join concept_reference_map map on term.concept_reference_term_id = map.concept_reference_term_id
9+
inner join concept concept on map.concept_id = concept.concept_id
10+
where source.name = 'ICD-10-WHO'
11+
and concept.uuid in ('123841AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA','136784AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
12+
'157460AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA','165866AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA','121317AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
13+
'112603AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA','3cde693a-26fe-102b-80cb-0017a47871b2','119399AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
14+
'3cd4e7e8-26fe-102b-80cb-0017a47871b2','3ccfb3b8-26fe-102b-80cb-0017a47871b2');
15+
delete from concept_reference_map where concept_map_id in (select * from tmp_mappings_to_cleanup);
16+
17+
18+
drop temporary table if exists tmp_mappings_to_cleanup;
19+
create temporary table tmp_mappings_to_cleanup
20+
as
21+
select map.concept_map_id
22+
from
23+
concept_reference_source source
24+
inner join concept_reference_term term on source.concept_source_id = term.concept_source_id
25+
inner join concept_reference_map map on term.concept_reference_term_id = map.concept_reference_term_id
26+
inner join concept concept on map.concept_id = concept.concept_id
27+
where source.name = 'SNOMED CT'
28+
and concept.uuid in ('157460AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA');
29+
delete from concept_reference_map where concept_map_id in (select * from tmp_mappings_to_cleanup);

0 commit comments

Comments
 (0)