Josh Mandel
Mar 15, 2024, 10:27 PM
I've made some progress on an implementation in C#, backed by sqlite. Still finicky about whitespace, but I'm just getting a feel for what indexes make this work well. Demo at https://termsql.fly.dev/ValueSet/$vcl takes two URL params ( system and query -- I'm not proposing this as a good definition, it's just the current state of my demo). The demo server spins down with disuse, so might take a few sec to answer your first query. Should be very fast after that. It can answer questions like What RxNorms are branded drugs with "chewable" in the name and contain an active ingredient of cetirizine ? $ curl -G 'https://termsql.fly.dev/ValueSet/$vcl' -d "system=http://www.nlm.nih.gov/research/umls/rxnorm&query=*:tty=SBD,{{term='chewable'}},consists_of.has_ingredient=20610" { "system" : "http://www.nlm.nih.gov/research/umls/rxnorm" , "code" : "1020022" , "display" : "ZyrTEC 10 MG Chewable Tablet" } { "system" : "http://www.nlm.nih.gov/research/umls/rxnorm" , "code" : "1086794" , "display" : "Wal-Zyr 10 MG Chewable Tablet" } What LOINCs use the ultrasound method with a cardiology class and include the word "wall"? $ curl -G 'https://termsql.fly.dev/ValueSet/$vcl' -d "system=http://loinc.org&query=*:METHOD_TYP='LP6572-4',CLASS='CARD.US',{{term='wall'}}" { "system" : "http://loinc.org" , "code" : "18052-1" , "display" : "Right ventricular anterior wall Fractional thickening freewall by US" } { "system" : "http://loinc.org" , "code" : "18116-4" , "display" : "Left ventricular Segmental wall appearance by US" } { "system" : "http://loinc.org" , "code" : "18153-7" , "display" : "Right ventricular anterior wall Thickness during diastole by US" } { "system" : "http://loinc.org" , "code" : "18157-8" , "display" : "Right ventricular anterior wall Thickness during systole by US" } { "system" : "http://loinc.org" , "code" : "18178-4" , "display" : "Left ventricular Wall motion index by US" } { "system" : "http://loinc.org" , "code" : "18179-2" , "display" : "Left ventricular Wall segment [Identifier] by US" } { "system" : "http://loinc.org" , "code" : "18837-5" , "display" : "Left ventricle Segmental wall appearance by US Narrative" } { "system" : "http://loinc.org" , "code" : "18840-9" , "display" : "Left ventricular Wall motion index by US Narrative" } { "system" : "http://loinc.org" , "code" : "59097-6" , "display" : "Left ventricular Meridional wall stress [Pressure] by US" } Source at https://github.com/jmandel/TermSqlite