CDAKCodeSystemHelper
public class CDAKCodeSystemHelper
General helpers for working with codes and code system
-
Aliases for known code sysems
EX:
FDA SPL
:NCI Thesaurus
Declaration
Swift
public static let CODE_SYSTEM_ALIASES: [String:String] = [
-
Some old OID are still around in data, this hash maps retired OID values to the new value
Declaration
Swift
public static let OID_ALIASES: [String:String] = [
-
Returns the name of a code system given an oid - parameter oid: [String] oid of a code system - returns: [String] the name of the code system as described in the measure definition JSON
Declaration
Swift
public class func code_system_for(oid: String) -> String
Parameters
oid
[String] oid of a code system
Return Value
[String] the name of the code system as described in the measure definition JSON
-
Returns the oid for a code system given a codesystem name - parameter code_system: [String] the name of the code system - returns: [String] the oid of the code system
Declaration
Swift
public class func oid_for_code_system(var code_system: String) -> String
Parameters
code
_system: [String] the name of the code system
Return Value
[String] the oid of the code system
-
Returns the whole map of OIDs to code systems - returns: [Hash] oids as keys, code system names as values
Declaration
Swift
public class func code_systems() -> [String:String]
Return Value
[Hash] oids as keys, code system names as values
-
Adds a code system/oid pair to the list of known code systems and oids
This can be used manually or happens automatically as code system/oid pairs are discovered during CDA import
Declaration
Swift
public class func addCodeSystem(code_system: String, oid: String? = "UNK")