Codelists provides functionality to generate a list of codes from different specifications.
There are three broad approaches:
Keep a manual list of codes.
One can generate a canonical set of codes given an input specification, and use those as required to test data. This approach is good when you have millions of rows of data and lots of checks to perform. Set-up time is longer but checks should be quicker. It is possible to generate a crossmap table to demonstrate how selection has occurred, and helpful for reproducibility at a time point.
One can test a set of identifiers against a specification. This approach is good when a codelist is very large, and fewer checks are needed. Set-up time is small.
In many situations all approaches might be necessary, depending on trade-offs. You might generate a codelist for documentation purposes but use a different approach to check each row of source data. All approaches should give the same answers.
Codelists provides functionality to generate a list of codes from different specifications. There are three broad approaches: 1. Keep a manual list of codes. 2. One can generate a canonical set of codes given an input specification, and use those as required to test data. This approach is good when you have millions of rows of data and lots of checks to perform. Set-up time is longer but checks should be quicker. It is possible to generate a crossmap table to demonstrate how selection has occurred, and helpful for reproducibility at a time point. 3. One can test a set of identifiers against a specification. This approach is good when a codelist is very large, and fewer checks are needed. Set-up time is small. In many situations all approaches might be necessary, depending on trade-offs. You might generate a codelist for documentation purposes but use a different approach to check each row of source data. All approaches should give the same answers.
(apply-union f x)
Applies function f to x, but if x is a sequence, returns the logical union of applying f to each member. 'f' should be a function returning a set.
Applies function f to x, but if x is a sequence, returns the logical union of applying f to each member. 'f' should be a function returning a set.
(atc->snomed-ecl {:com.eldrix/keys [dmd hermes]} atc)
Map an ATC regexp into a SNOMED expression that can include all UK product identifiers (VTM, VMP, AMP and TF). This does not include product packs, by design.
Map an ATC regexp into a SNOMED expression that can include all UK product identifiers (VTM, VMP, AMP and TF). This does not include product packs, by design.
(disjoint? & sets)
Are sets disjoint, so that no set shares a member with any other set? Note this is different to determining the intersection between the sets. e.g. (clojure.set/intersection #{1 2} #{2 3} #{4 5}) => #{} ; no intersection (disjoint? #{1 2} #{2 3} #{4 5}) => false ; not disjoint.
Are sets disjoint, so that no set shares a member with any other set? Note this is different to determining the intersection between the sets. e.g. (clojure.set/intersection #{1 2} #{2 3} #{4 5}) => #{} ; no intersection (disjoint? #{1 2} #{2 3} #{4 5}) => false ; not disjoint.
(realize-concepts* {:com.eldrix/keys [hermes dmd] :as env}
{and' :and or' :or not' :not :keys [ecl icd10 atc]})
(to-atc {:com.eldrix/keys [hermes dmd] :as system} concept-ids)
Map a collection of concept identifiers to a set of ATC codes. The UK dm+d via the dmd library supports VTMs, VMPs, AMPs, AMPPs and VMPPs, but cannot map from TF concepts. As such, this checks whether the product is a TF concept id, and simply uses the VMPs instead.
Map a collection of concept identifiers to a set of ATC codes. The UK dm+d via the dmd library supports VTMs, VMPs, AMPs, AMPPs and VMPPs, but cannot map from TF concepts. As such, this checks whether the product is a TF concept id, and simply uses the VMPs instead.
(to-icd10 {:com.eldrix/keys [hermes]} concept-ids)
Map a collection of concept identifiers to a set of ICD-10 codes.
Map a collection of concept identifiers to a set of ICD-10 codes.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close