Function dgc::lookup_value [−][src]
Expand description
Get the descriptive value for an identifier using the data in the official valuesets.
Data encoded within the certificates often uses well known IDs to identify certain information (country, disease, type of test, etc.). This function provides a way to get the descriptive version of these ids.
If the value is not found in the valueset, the given value_id
is returned.
Examples
assert_eq!(lookup_value("AQ"), "Antarctica");
assert_eq!(lookup_value("840539006"), "COVID-19");
assert_eq!(lookup_value("LP217198-3"), "Rapid immunoassay");
assert_eq!(lookup_value("EU/1/20/1528"), "Comirnaty");
assert_eq!(lookup_value("value not in valueset"), "value not in valueset");