Stream: Medication
Topic: NDC codes
Grahame Grieve (Oct 28 2021 at 06:26):
Hey
When I run a clean build on the main specification, I get the following validation errors:
ERROR @ Medication.ingredient[2].item.concept.coding[0] (line 0, col0): medicationexample0318:: Medication.ingredient[2].item.concept.coding[0]: Code "0338-0519-02" not found in NDC; The code "0338-0519-02" is not valid in the system http://hl7.org/fhir/sid/ndc; The code provided (http://hl7.org/fhir/sid/ndc#0338-0519-02) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r4) for 'http://hl7.org/fhir/sid/ndc#0338-0519-02' (src = TerminologyEngine)
ERROR @ MedicationAdministration.contained[0].ofType(Medication).ingredient[2].item.concept.coding[0] (line 0, col0): medicationadministration0309:: MedicationAdministration.contained[0].ofType(Medication).ingredient[2].item.concept.coding[0]: Code "0338-0519-02" not found in NDC; The code "0338-0519-02" is not valid in the system http://hl7.org/fhir/sid/ndc; The code provided (http://hl7.org/fhir/sid/ndc#0338-0519-02) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r4) for 'http://hl7.org/fhir/sid/ndc#0338-0519-02' (src = TerminologyEngine)
ERROR @ MedicationDispense.contained[0].ofType(Medication).code.coding[0] (line 0, col0): medicationdispense0319:: MedicationDispense.contained[0].ofType(Medication).code.coding[0]: Code "33261-141-20" not found in NDC; The code "33261-141-20" is not valid in the system http://hl7.org/fhir/sid/ndc; The code provided (http://hl7.org/fhir/sid/ndc#33261-141-20) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r4) for 'http://hl7.org/fhir/sid/ndc#33261-141-20' (src = TerminologyEngine)
ERROR @ MedicationDispense.contained[0].ofType(Medication).ingredient[2].item.concept.coding[0] (line 0, col0): medicationdispense0320:: MedicationDispense.contained[0].ofType(Medication).ingredient[2].item.concept.coding[0]: Code "0338-0519-02" not found in NDC; The code "0338-0519-02" is not valid in the system http://hl7.org/fhir/sid/ndc; The code provided (http://hl7.org/fhir/sid/ndc#0338-0519-02) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r4) for 'http://hl7.org/fhir/sid/ndc#0338-0519-02' (src = TerminologyEngine)
ERROR @ MedicationDispense.medication.concept.coding[0] (line 0, col0): medicationdispense0321:: MedicationDispense.medication.concept.coding[0]: Code "0074-3043-13" not found in NDC; The code "0074-3043-13" is not valid in the system http://hl7.org/fhir/sid/ndc; The code provided (http://hl7.org/fhir/sid/ndc#0074-3043-13) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r4) for 'http://hl7.org/fhir/sid/ndc#0074-3043-13' (src = TerminologyEngine)
ERROR @ MedicationDispense.medication.concept.coding[0] (line 0, col0): medicationdispense0322:: MedicationDispense.medication.concept.coding[0]: Code "0071-2214-20" not found in NDC; The code "0071-2214-20" is not valid in the system http://hl7.org/fhir/sid/ndc; The code provided (http://hl7.org/fhir/sid/ndc#0071-2214-20) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r4) for 'http://hl7.org/fhir/sid/ndc#0071-2214-20' (src = TerminologyEngine)
ERROR @ MedicationDispense.contained[0].ofType(Medication).code.coding[0] (line 0, col0): medicationdispense0330:: MedicationDispense.contained[0].ofType(Medication).code.coding[0]: Code "0056-0172-70" not found in NDC; The code "0056-0172-70" is not valid in the system http://hl7.org/fhir/sid/ndc; The code provided (http://hl7.org/fhir/sid/ndc#0056-0172-70) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r4) for 'http://hl7.org/fhir/sid/ndc#0056-0172-70' (src = TerminologyEngine)
ERROR @ MedicationDispense.contained[0].ofType(Medication).code.coding[0] (line 0, col0): medicationdispense0331:: MedicationDispense.contained[0].ofType(Medication).code.coding[0]: Code "0056-0170-70" not found in NDC; The code "0056-0170-70" is not valid in the system http://hl7.org/fhir/sid/ndc; The code provided (http://hl7.org/fhir/sid/ndc#0056-0170-70) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r4) for 'http://hl7.org/fhir/sid/ndc#0056-0170-70' (src = TerminologyEngine)
ERROR @ MedicationDispense.contained[0].ofType(Medication).ingredient[2].item.concept.coding[0] (line 0, col0): medicationdispense0332:: MedicationDispense.contained[0].ofType(Medication).ingredient[2].item.concept.coding[0]: Code "0338-0519-02" not found in NDC; The code "0338-0519-02" is not valid in the system http://hl7.org/fhir/sid/ndc; The code provided (http://hl7.org/fhir/sid/ndc#0338-0519-02) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r4) for 'http://hl7.org/fhir/sid/ndc#0338-0519-02' (src = TerminologyEngine)
ERROR @ MedicationRequest.contained[0].ofType(Medication).ingredient[2].item.concept.coding[0] (line 0, col0): medicationrequest0323:: MedicationRequest.contained[0].ofType(Medication).ingredient[2].item.concept.coding[0]: Code "0338-0519-02" not found in NDC; The code "0338-0519-02" is not valid in the system http://hl7.org/fhir/sid/ndc; The code provided (http://hl7.org/fhir/sid/ndc#0338-0519-02) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r4) for 'http://hl7.org/fhir/sid/ndc#0338-0519-02' (src = TerminologyEngine)
ERROR @ MedicationRequest.contained[0].ofType(Medication).code.coding[0] (line 0, col0): medicationrequest0339:: MedicationRequest.contained[0].ofType(Medication).code.coding[0]: Code "0067-2091-03" not found in NDC; The code "0067-2091-03" is not valid in the system http://hl7.org/fhir/sid/ndc; The code provided (http://hl7.org/fhir/sid/ndc#0067-2091-03) is not valid in the value set 'All codes known to the system' (from http://tx.fhir.org/r4) for 'http://hl7.org/fhir/sid/ndc#0067-2091-03' (src = TerminologyEngine)
Grahame Grieve (Oct 28 2021 at 06:27):
Indeed, none of them are in the copy of NDC loaded on the server tx.fhir.org. Are they wrong, or is the server wrong? can anyone comment?
thanks (@Rob Hausam)
Rob Hausam (Oct 28 2021 at 13:30):
@Grahame Grieve My first guess is that they are wrong. NDC isn't particularly "well-behaved". I believe it is still true that codes can be and frequently are removed from the code system distribution when the products are no longer being marketed. Here's the salient comment from the FDA:
The NDC Directory contains product listing data that have reached the marketing start date and have not reached marketing end date.
Lloyd McKenzie (Oct 28 2021 at 15:20):
Ick?
Melva Peters (Oct 28 2021 at 18:09):
@Grahame Grieve can you give me the examples that fail validation with these errors and I'll fix? I'm not sure how to avoid having to fix on occasion other than to not use NDC codes in our examples.
Jean Duteau (Oct 28 2021 at 18:10):
i'll point out that the first one ' 0338-0519-02' was an actual NDC: Intralipid 250 mL in 1 BAG (0338-0519-02)
(Baxter Healthcare CORP). but it has stopped being marketed and only -04, -09, -13, -14, -58 are valid packaged codes.
Grahame Grieve (Oct 28 2021 at 22:22):
all the examples are above
Grahame Grieve (Oct 28 2021 at 22:23):
@Melva Peters
Melva Peters (Oct 29 2021 at 01:09):
Thanks Grahame, I couldn't expand the examples, but was able to copy and paste into a text file.
Melva Peters (Nov 01 2021 at 18:02):
Thinking more about this and Jean's comment, It seems to me that this is an issue if the terminology considers codes for medications that were marketed previously as no longer valid. Just because it is no longer marketed, doesn't mean it isn't a valid medication at some point. This is going to be a never ending (and never winning) battle to have update examples based on codes.
Grahame Grieve (Nov 01 2021 at 21:22):
it certainly is a problem. Is there a full list of past and present ndc codes anywhere?
Grahame Grieve (Nov 01 2021 at 21:27):
apparently not. I'm now collecting old versions of NDC please - if you have any old copies - the older the better - please send them to me, as long as you have a date for them (approximate is ok)
Patrick McLaughlin (NLM) (Nov 01 2021 at 21:55):
This RxNorm API includes current and historical NDCs from RxNorm, starting with 2005. https://lhncbc.nlm.nih.gov/RxNav/APIs/api-RxNorm.getAllNDCsByStatus.html
Grahame Grieve (Nov 01 2021 at 23:14):
doesn't have descriptions though....
Grahame Grieve (Nov 02 2021 at 00:00):
@Patrick McLaughlin (NLM) are those product and package codes? or just product codes?
Grahame Grieve (Nov 02 2021 at 06:54):
well, I found source for the following versions:
Grahame Grieve (Nov 02 2021 at 06:56):
I loaded them all, and then I still only had information for 20% of the codes UMLS thinks existed (and I had many other codes besides). Perhaps I don't know what I'm doing, so here's the list of codes I couldn't find:
Grahame Grieve (Nov 02 2021 at 06:56):
Grahame Grieve (Nov 02 2021 at 11:24):
anyway, all the codes above are about to become valid codes again, so there's no need to fix any examples
Grahame Grieve (Nov 02 2021 at 12:07):
(@Melva Peters )
Patrick McLaughlin (NLM) (Nov 02 2021 at 12:26):
Grahame Grieve said:
Patrick McLaughlin (NLM) are those product and package codes? or just product codes?
Those are 11-digit package codes.
You can retrieve RXCUI, conceptName, etc. from the NDC with this API: https://lhncbc.nlm.nih.gov/RxNav/APIs/api-RxNorm.getNDCStatus.html
Grahame Grieve (Nov 18 2021 at 00:51):
a follow up NDC question from here: https://chat.fhir.org/#narrow/stream/179252-IG-creation/topic/NDC.20display.20names
Grahame Grieve (Nov 18 2021 at 00:52):
what's the correct display for an NDC package code? The NDC site appears to be using the associated product text for the package code - that means that multiple NDC package codes all have the same display? is that right?
(@Patrick McLaughlin (NLM) )
Last updated: Apr 12 2022 at 19:14 UTC