-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Package needs more documentation #14
Comments
Here's an example I posted on Zulip: So, you first need to download the RxNorm files. E.g. go to https://www.nlm.nih.gov/research/umls/rxnorm/docs/rxnormfiles.html and click on the Then, you download the Then follow the examples here: https://juliahealth.org/PharmaceuticalClassification.jl/dev/examples/ (Changing the paths to Here's some example output. The graph takes a few minutes to generate, so we generate it once, and then we save it to file. Then in the future, we load the graph from file, which is faster than having to generate it each time. julia> using PharmaceuticalClassification
julia> using Serialization
julia> rxnsat = "/Users/dilum/Downloads/rxnorm/rrf/RXNSAT.RRF"
"/Users/dilum/Downloads/rxnorm/rrf/RXNSAT.RRF"
julia> rxnrel = "/Users/dilum/Downloads/rxnorm/rrf/RXNREL.RRF"
"/Users/dilum/Downloads/rxnorm/rrf/RXNREL.RRF"
julia> graph = build_graph(; rxnrel, rxnsat);
Progress: 100%|███████████████████████████████████████████████████| Time: 0:01:46
julia> Serialization.serialize("my_graph_filename.serialized", graph) julia> using PharmaceuticalClassification
julia> using Serialization
julia> graph = Serialization.deserialize("my_graph_filename.serialized")
PharmGraph{Int64, Float64}({1728093, 4865855} directed Int64 metagraph with Float64 weights defined by :weight (default weight 1.0))
julia> pars = parents(graph, PharmClass("NDC", "0591-2412-19"))
116-element Vector{PharmClass}:
PharmClass("ATC1", "A")
PharmClass("ATC2", "A10")
PharmClass("ATC3", "A10B")
PharmClass("ATC4", "A10BA")
PharmClass("ATC5", "A10BA02")
PharmClass("NDC", "000378600191")
PharmClass("NDC", "000591272060")
PharmClass("NDC", "00378-6001-91")
PharmClass("NDC", "00378600191")
PharmClass("NDC", "00591-2412-19")
PharmClass("NDC", "00591-2720-60")
PharmClass("NDC", "00591241219")
PharmClass("NDC", "00591272060")
PharmClass("NDC", "011788003860")
PharmClass("NDC", "027241018960")
PharmClass("NDC", "029033003206")
PharmClass("NDC", "0378-6001-91")
⋮
PharmClass("NDC", "68462-521-05")
PharmClass("NDC", "68462-521-90")
PharmClass("NDC", "68462052101")
PharmClass("NDC", "68462052105")
PharmClass("NDC", "68462052190")
PharmClass("NDC", "68682-0018-90")
PharmClass("NDC", "68682-018-90")
PharmClass("NDC", "68682001890")
PharmClass("NDC", "70010-497-09")
PharmClass("NDC", "70010049709")
PharmClass("NDC", "70247-018-60")
PharmClass("NDC", "70247001860")
PharmClass("RXCUI", "1807888")
PharmClass("RXCUI", "1807894")
PharmClass("RXCUI", "2391533")
PharmClass("RXCUI", "6809")
PharmClass("RXCUI", "860995")
julia> filter(x -> startswith(x.system, "ATC"), pars)
5-element Vector{PharmClass}:
PharmClass("ATC1", "A")
PharmClass("ATC2", "A10")
PharmClass("ATC3", "A10B")
PharmClass("ATC4", "A10BA")
PharmClass("ATC5", "A10BA02") In this example, The commands julia> filter(x -> startswith(x.system, "ATC"), pars)
5-element Vector{PharmClass}:
PharmClass("ATC1", "A")
PharmClass("ATC2", "A10")
PharmClass("ATC3", "A10B")
PharmClass("ATC4", "A10BA")
PharmClass("ATC5", "A10BA02") This shows the Anatomical Therapeutic Chemical (ATC) classes corresponding to our input NDC. If you go to https://www.whocc.no/atc_ddd_index/ and put in each of those ATC values, you find that:
So, in other words, PharmaceuticalClassification lets us do the following mappings:
|
No description provided.
The text was updated successfully, but these errors were encountered: