Skip to content

Commit

Permalink
update container to immediateContainer
Browse files Browse the repository at this point in the history
  • Loading branch information
odscjen committed Nov 30, 2023
1 parent 4cf14cc commit 51a1a19
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 17 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Acetilcisteina | ACETILCISTEINA-N 100 MG/ML SOLUCION PARA NEBULIZAR FRASCO 15-30

The strength is expressed as "100 MG/ML". The UN/CEFACT [Recommendation 20 – Codes for Units of Measure Used in International Trade](https://unece.org/trade/uncefact/cl-recommendations) codelist includes units like mg/l, g/l and kg/l, but not mg/ml. So, "100 MG/ML" is expressed as 100 g/l below.

Based on this information, we can add the `dosageForm`, `administrationRoute`, `container` and `activeIngredients`.
Based on this information, we can add the `dosageForm`, `administrationRoute`, `immediateContainer` and `activeIngredients`.

```json
{
Expand All @@ -44,7 +44,7 @@ Based on this information, we can add the `dosageForm`, `administrationRoute`, `
},
"dosageForm": "SOL",
"administrationRoute": "NASINHL",
"container": {
"immediateContainer": {
"name": "vial",
"capacity": {
"unit": {
Expand All @@ -71,6 +71,7 @@ Based on this information, we can add the `dosageForm`, `administrationRoute`, `
}
}
```

### More than one active ingredient

In this example, we demonstrate how to use this extension to describe a [drug procurement process](https://www.contrataciones.gov.py/licitaciones/convocatoria/391507-adquisicion-medicamentos-hospital-clinicas-1.html#pliego) from Paraguay. (You can view its [original OCDS data](https://contrataciones.gov.py/datos/api/v3/doc/ocds/record/ocds-03ad3f-391507).)
Expand All @@ -83,7 +84,7 @@ Clorhidrato de Bupivacaina Hiperbarica Inyectable | clorhidrato de bupivacaina 2

For the name of the active ingredient, Annex 2 of the [INN Stem Book 2018](https://www.who.int/teams/health-product-and-policy-standards/inn/stembook), describes how to name acid salts: in this case, "bupivacainum hydrochloridum".

Based on this information, we can add the `dosageForm`, `administrationRoute`, `container` and `activeIngredients`.
Based on this information, we can add the `dosageForm`, `administrationRoute`, `immediateContainer` and `activeIngredients`.

```json
{
Expand All @@ -93,7 +94,7 @@ Based on this information, we can add the `dosageForm`, `administrationRoute`, `
"id": "1",
"dosageForm": "SOL",
"administrationRoute": "ISINJ",
"container": {
"immediateContainer": {
"name": "amp",
"capacity": {
"unit": {
Expand Down Expand Up @@ -139,7 +140,7 @@ The fields, definitions and codelists used in this extension are based on the fo
- Most of the fields are based on the [Drug](https://schema.org/Drug) definition by the [Schema.org Community Group](https://www.w3.org/community/schemaorg/) and the [Medication Resource](https://www.hl7.org/fhir/medication.html) from [Fast Healthcare Interoperability Resources (FHIR)](https://hl7.org/fhir/) standard.
- The `administrationRoute` codelist contains the top-level concepts in HL7's [Route of Administration](https://terminology.hl7.org/CodeSystem/v3-RouteOfAdministration/) codelist, excluding any synonymous terms.
- The `dosageForm` codelist contains the top-level concepts in HL7's [Orderable Drug Form](https://terminology.hl7.org/CodeSystem/v3-orderableDrugForm/) codelist, excluding the specific forms of sprays.
- The `container` codelist is a copy of the codes and titles from FHIR's [Medication Knowledge Package Type](https://terminology.hl7.org/CodeSystem/medicationknowledge-package-type/) codelist. Given that the terms are undefined in FHIR, the descriptions are copied from corresponding terms from the [EDQM Standard Terms database](https://standardterms.edqm.eu), reproduced with the permission of the European Directorate for the Quality of Medicines & HealthCare, Council of Europe (EDQM). The EDQM Standard Terms database is not a static list and content can change over time; the descriptions were retrieved on July 21, 2021.
- The `immediateContainer` codelist is a copy of the codes and titles from FHIR's [Medication Knowledge Package Type](https://terminology.hl7.org/CodeSystem/medicationknowledge-package-type/) codelist. Given that the terms are undefined in FHIR, the descriptions are copied from corresponding terms from the [EDQM Standard Terms database](https://standardterms.edqm.eu), reproduced with the permission of the European Directorate for the Quality of Medicines & HealthCare, Council of Europe (EDQM). The EDQM Standard Terms database is not a static list and content can change over time; the descriptions were retrieved on July 21, 2021.

## Background

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion extension.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"codelists": [
"dosageForm.csv",
"administrationRoute.csv",
"container.csv"
"immediateContainer.csv"
],
"compatibility": [
"1.1"
Expand Down
8 changes: 4 additions & 4 deletions manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,11 @@ def cli():
@cli.command()
def update_container():
"""
Update schema/codelists/container.csv from HL7.
Update schema/codelists/immediateContainer.csv from HL7.
"""
# Retain the descriptions from EDQM.
descriptions = {}
with (basedir / 'codelists' / 'container.csv').open() as f:
with (basedir / 'codelists' / 'immediateContainer.csv').open() as f:
reader = csv.DictReader(f)
for row in reader:
descriptions[row['Code']] = row['Description']
Expand All @@ -146,7 +146,7 @@ def update_container():

data = response.json()

with csv_dump('container.csv', ['Code', 'Title', 'Description']) as writer:
with csv_dump('immediateContainer.csv', ['Code', 'Title', 'Description']) as writer:
writer.writerows([[code['code'], code['display'], descriptions[code['code']]] for code in data['concept']])


Expand Down Expand Up @@ -195,7 +195,7 @@ def update_dosage_form():
@click.pass_context
def update(ctx):
"""
Update external codelists (administration route, container, dosage form).
Update external codelists (administration route, immediateContainer, dosage form).
"""
ctx.invoke(update_administration_route)
ctx.invoke(update_container)
Expand Down
14 changes: 7 additions & 7 deletions release-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@
"openCodelist": true,
"minLength": 1
},
"container": {
"title": "Container",
"immediateContainer": {
"title": "Immediate container",
"description": "The immediate container for the medicine. Also known as: presentation, presentation form, package.",
"$ref": "#/definitions/Container"
"$ref": "#/definitions/ImmediateContainer"
}
}
},
Expand All @@ -64,19 +64,19 @@
},
"minProperties": 1
},
"Container": {
"title": "Container",
"ImmediateContainer": {
"title": "Immediate container",
"description": "The immediate container for the medicine. Also known as: presentation, presentation form, package.",
"type": "object",
"properties": {
"name": {
"title": "Name",
"description": "The common name of the container, from the container codelist.",
"description": "The common name of the container, from the immediate container codelist.",
"type": [
"string",
"null"
],
"codelist": "container.csv",
"codelist": "immediateContainer.csv",
"openCodelist": true,
"minLength": 1
},
Expand Down

0 comments on commit 51a1a19

Please sign in to comment.