Here are the examples of the python api fhir.resources.codeableconcept.CodeableConcept taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
4 Examples
3
View Source File : dicom2fhirutils.py
License : Apache License 2.0
Project Creator : LinuxForHealth
License : Apache License 2.0
Project Creator : LinuxForHealth
def gen_accession_identifier(id):
idf = identifier.Identifier()
idf.use = "usual"
idf.type = codeableconcept.CodeableConcept()
idf.type.coding = []
acsn = coding.Coding()
acsn.system = TERMINOLOGY_CODING_SYS
acsn.code = TERMINOLOGY_CODING_SYS_CODE_ACCESSION
idf.type.coding.append(acsn)
idf.value = id
return idf
def gen_studyinstanceuid_identifier(id):
0
View Source File : dicom2fhirutils.py
License : Apache License 2.0
Project Creator : LinuxForHealth
License : Apache License 2.0
Project Creator : LinuxForHealth
def get_patient_resource_ids(PatientID, IssuerOfPatientID):
idf = identifier.Identifier()
idf.use = "usual"
idf.value = PatientID
idf.type = codeableconcept.CodeableConcept()
idf.type.coding = []
id_coding = coding.Coding()
id_coding.system = TERMINOLOGY_CODING_SYS
id_coding.code = TERMINOLOGY_CODING_SYS_CODE_MRN
idf.type.coding.append(id_coding)
if IssuerOfPatientID is not None:
idf.assigner = reference.Reference()
idf.assigner.display = IssuerOfPatientID
return idf
def calc_gender(gender):
0
View Source File : dicom2fhirutils.py
License : Apache License 2.0
Project Creator : LinuxForHealth
License : Apache License 2.0
Project Creator : LinuxForHealth
def gen_procedurecode_array(procedures):
if procedures is None:
return None
fhir_proc = []
for p in procedures:
concept = codeableconcept.CodeableConcept()
c = coding.Coding()
c.system = p["system"]
c.code = p["code"]
c.display = p["display"]
concept.coding = []
concept.coding.append(c)
concept.text = p["display"]
fhir_proc.append(concept)
if len(fhir_proc) > 0:
return fhir_proc
return None
def gen_started_datetime(dt, tm):
0
View Source File : dicom2fhirutils.py
License : Apache License 2.0
Project Creator : LinuxForHealth
License : Apache License 2.0
Project Creator : LinuxForHealth
def gen_reason(reason, reasonStr):
if reason is None and reasonStr is None:
return None
reasonList = []
if reason is None or len(reason) < = 0:
rc = codeableconcept.CodeableConcept()
rc.text = reasonStr
reasonList.append(rc)
return reasonList
for r in reason:
rc = codeableconcept.CodeableConcept()
rc.coding = []
c = coding.Coding()
c.system = r["system"]
c.code = r["code"]
c.display = r["display"]
rc.coding.append(c)
reasonList.append(rc)
return reasonList
def gen_modality_coding(mod):