Skwerl / hs-util

0 stars 0 forks source link

CCD Import: Entire medications object is missing #38

Closed ejancic closed 11 years ago

ejancic commented 11 years ago

Entire medication profile is null on CCD Import

ejancic commented 11 years ago

Also happening with CCR import, see comment on ticket #27 comment

Skwerl commented 11 years ago

Can you take another look at this? I took the big JSON payload you sent a few minutes ago, exported it to a CCD, and then re-imported that CCD, and I see the following medications object:

"medication": [{
        "drug": {
            "brandName": "Lipitor",
            "genericName": "atorvastatin calcium",
            "form": "Tablet",
            "strength": "10 mg",
            "routeCode": "PO",
            "rxNormId": "617314"
        },
        "patientPrescription": [{
                "prescribe": {
                    "sig": {
                        "drug": {
                            "brandName": "Lipitor",
                            "genericName": "atorvastatin calcium",
                            "form": "Tablet",
                            "strength": "10 mg",
                            "routeCode": "PO",
                            "rxNormId": "617314"
                        },
                        "dose": "1",
                        "doseUnit": "tablet",
                        "route": "PO",
                        "doseTiming": "once a day"
                    }
                },
                "createdAt": "2013-04-03T00:00:00-07:00"
            }
        ]
    }, {
        "drug": {
            "brandName": "Lasix",
            "genericName": "furosemide",
            "form": "Tablet",
            "strength": "20 mg",
            "routeCode": "PO",
            "rxNormId": "200801"
        },
        "patientPrescription": [{
                "prescribe": {
                    "sig": {
                        "drug": {
                            "brandName": "Lasix",
                            "genericName": "furosemide",
                            "form": "Tablet",
                            "strength": "20 mg",
                            "routeCode": "PO",
                            "rxNormId": "200801"
                        },
                        "dose": "1",
                        "doseUnit": "tablet",
                        "route": "PO",
                        "doseTiming": "once a day"
                    }
                },
                "createdAt": "2013-04-03T00:00:00-07:00"
            }
        ]
    }, {
        "drug": {
            "brandName": "Klor-Con 10",
            "genericName": "potassium chloride",
            "form": "tablet extended release",
            "strength": "10 mEq",
            "routeCode": "PO",
            "rxNormId": "628958"
        },
        "patientPrescription": [{
                "prescribe": {
                    "sig": {
                        "drug": {
                            "brandName": "Klor-Con 10",
                            "genericName": "potassium chloride",
                            "form": "tablet extended release",
                            "strength": "10 mEq",
                            "routeCode": "PO",
                            "rxNormId": "628958"
                        },
                        "dose": "1",
                        "doseUnit": "tablet",
                        "route": "PO",
                        "doseTiming": "once a day"
                    }
                },
                "createdAt": "2013-04-03T00:00:00-07:00"
            }
        ]
    }
]
ejancic commented 11 years ago

I tried as suggested and the medications are there except Klor-Con isn't getting imported for some reason

XML that I used is attached

Medication Profile that gets imported:

{ "medication": { "00071015640": { "drug": { "rcopiaId": null, "ndcid": "00071015640", "brandName": "Lipitor", "genericName": "atorvastatin calcium", "fullDescription": null, "brandType": null, "form": "Tablet", "strength": "10 mg", "routeCode": "Oral", "rxNormType": null, "rxNormId": null, "drugGroup": null }, "note": [], "patientPrescription": [ { "prescribe": { "prescribeIdentity": "0a11c81a-9905-4188-acc0-141cc40bb9a8", "patientIdentity": "e4eab09f-2719-4174-b351-e475c11705c4", "patientExternalIdentity": "", "pharmacyIdentity": "", "hasScheduledDrug": false, "stopDate": null, "addToMedicationList": true, "sig": { "drug": { "rcopiaId": null, "ndcid": "00071015640", "brandName": "Lipitor", "genericName": "atorvastatin calcium", "fullDescription": null, "brandType": null, "form": "Tablet", "strength": "10 mg", "routeCode": "Oral", "rxNormType": null, "rxNormId": null, "drugGroup": null }, "action": "Apply", "dose": "1", "doseUnit": "tablet", "route": "by mouth", "doseTiming": "once a day", "doseOther": null, "duration": "7 days", "quantity": "14", "quantityUnits": "tablets", "refills": "2", "substitutionPermitted": true, "otherNotes": "Other Notes", "patientNotes": "Patient Notes", "comments": "Comments", "schedule": null, "writtenDate": null, "effectiveDate": null, "lastFillDate": null, "soldDate": null }, "checkId": null, "signaturePassword": "1234", "prescriberOrderNumber": null, "rxReferenceNumber": null, "formularyNote": null, "interactionNote": null, "allergyReaction": null, "interactionReaction": null, "drugInteractionCheckPerformed": false, "icd9": null, "ePrescribe": false, "createdBy": "be325bed-e32a-40ab-9c55-df96936f2ff2", "createdByFirstName": "chuck", "createdByLastName": "norris" }, "createdAt": "2013-04-03T19:44:57.267Z", "createdBy": "be325bed-e32a-40ab-9c55-df96936f2ff2", "active": true, "source": "SOCIAL_CARE" } ], "active": true, "source": "SOCIAL_CARE", "education": [ "http://www.rxlist.com/lipitor-drug.htm" ] }, "00039006710": { "drug": { "rcopiaId": null, "ndcid": "00039006710", "brandName": "Lasix", "genericName": "furosemide", "fullDescription": null, "brandType": null, "form": "Tablet", "strength": "20 mg", "routeCode": "Oral", "rxNormType": null, "rxNormId": "200801", "drugGroup": null }, "note": [], "patientPrescription": [ { "prescribe": { "prescribeIdentity": "2b30ddd8-de14-4522-8f87-157e3e43df54", "patientIdentity": "e4eab09f-2719-4174-b351-e475c11705c4", "patientExternalIdentity": "", "pharmacyIdentity": "", "hasScheduledDrug": false, "stopDate": null, "addToMedicationList": true, "sig": { "drug": { "rcopiaId": null, "ndcid": "00039006710", "brandName": "Lasix", "genericName": "furosemide", "fullDescription": null, "brandType": null, "form": "Tablet", "strength": "20 mg", "routeCode": "Oral", "rxNormType": null, "rxNormId": "200801", "drugGroup": null }, "action": "Apply", "dose": "1", "doseUnit": "tablet", "route": "by mouth", "doseTiming": "once a day", "doseOther": null, "duration": "7 days", "quantity": "14", "quantityUnits": "tablets", "refills": "2", "substitutionPermitted": true, "otherNotes": "Other Notes", "patientNotes": "Patient Notes", "comments": "Comments", "schedule": null, "writtenDate": null, "effectiveDate": null, "lastFillDate": null, "soldDate": null }, "checkId": null, "signaturePassword": "1234", "prescriberOrderNumber": null, "rxReferenceNumber": null, "formularyNote": null, "interactionNote": null, "allergyReaction": null, "interactionReaction": null, "drugInteractionCheckPerformed": false, "icd9": null, "ePrescribe": false, "createdBy": "be325bed-e32a-40ab-9c55-df96936f2ff2", "createdByFirstName": "chuck", "createdByLastName": "norris" }, "createdAt": "2013-04-03T19:44:57.646Z", "createdBy": "be325bed-e32a-40ab-9c55-df96936f2ff2", "active": true, "source": "SOCIAL_CARE" }, { "prescribe": { "prescribeIdentity": "5a588363-feb5-4d14-9c52-23f828f0262d", "patientIdentity": "e4eab09f-2719-4174-b351-e475c11705c4", "patientExternalIdentity": "", "pharmacyIdentity": "", "hasScheduledDrug": false, "stopDate": null, "addToMedicationList": true, "sig": { "drug": { "rcopiaId": null, "ndcid": "00039006710", "brandName": "Lasix", "genericName": "furosemide", "fullDescription": null, "brandType": null, "form": "Tablet", "strength": "20 mg", "routeCode": "Oral", "rxNormType": null, "rxNormId": "200801", "drugGroup": null }, "action": "Apply", "dose": "1", "doseUnit": "tablet", "route": "by mouth", "doseTiming": "once a day", "doseOther": null, "duration": "7 days", "quantity": "14", "quantityUnits": "tablets", "refills": "2", "substitutionPermitted": true, "otherNotes": "Other Notes", "patientNotes": "Patient Notes", "comments": "Comments", "schedule": null, "writtenDate": null, "effectiveDate": null, "lastFillDate": null, "soldDate": null }, "checkId": null, "signaturePassword": "1234", "prescriberOrderNumber": null, "rxReferenceNumber": null, "formularyNote": null, "interactionNote": null, "allergyReaction": null, "interactionReaction": null, "drugInteractionCheckPerformed": false, "icd9": null, "ePrescribe": false, "createdBy": "be325bed-e32a-40ab-9c55-df96936f2ff2", "createdByFirstName": "chuck", "createdByLastName": "norris" }, "createdAt": "2013-04-03T19:44:58.037Z", "createdBy": "be325bed-e32a-40ab-9c55-df96936f2ff2", "active": true, "source": "SOCIAL_CARE" } ], "active": true, "source": "SOCIAL_CARE", "education": [ "http://www.rxlist.com/lasix-drug.htm" ] } }, "noActiveMedication": false }

On Apr 3, 2013, at 11:50 AM, Skwerl notifications@github.com wrote:

Can you take another look at this? I took the big JSON payload you sent a few minutes ago, exported it to a CCD, and then re-imported that CCD, and I see the following medications object:

"medication": [{ "drug": { "brandName": "Lipitor", "genericName": "atorvastatin calcium", "form": "Tablet", "strength": "10 mg", "routeCode": "PO", "rxNormId": "617314" }, "patientPrescription": [{ "prescribe": { "sig": { "drug": { "brandName": "Lipitor", "genericName": "atorvastatin calcium", "form": "Tablet", "strength": "10 mg", "routeCode": "PO", "rxNormId": "617314" }, "dose": "1", "doseUnit": "tablet", "route": "PO", "doseTiming": "once a day" } }, "createdAt": "2013-04-03T00:00:00-07:00" } ] }, { "drug": { "brandName": "Lasix", "genericName": "furosemide", "form": "Tablet", "strength": "20 mg", "routeCode": "PO", "rxNormId": "200801" }, "patientPrescription": [{ "prescribe": { "sig": { "drug": { "brandName": "Lasix", "genericName": "furosemide", "form": "Tablet", "strength": "20 mg", "routeCode": "PO", "rxNormId": "200801" }, "dose": "1", "doseUnit": "tablet", "route": "PO", "doseTiming": "once a day" } }, "createdAt": "2013-04-03T00:00:00-07:00" } ] }, { "drug": { "brandName": "Klor-Con 10", "genericName": "potassium chloride", "form": "tablet extended release", "strength": "10 mEq", "routeCode": "PO", "rxNormId": "628958" }, "patientPrescription": [{ "prescribe": { "sig": { "drug": { "brandName": "Klor-Con 10", "genericName": "potassium chloride", "form": "tablet extended release", "strength": "10 mEq", "routeCode": "PO", "rxNormId": "628958" }, "dose": "1", "doseUnit": "tablet", "route": "PO", "doseTiming": "once a day" } }, "createdAt": "2013-04-03T00:00:00-07:00" } ] } ] — Reply to this email directly or view it on GitHub.

Skwerl commented 11 years ago

I am seeing Klor-Con in the JSON when I run that XML through the CMTS:

"medication": [{
        "drug": {
            "brandName": "Lipitor",
            "genericName": "atorvastatin calcium",
            "form": "Tablet",
            "strength": "10 mg",
            "routeCode": "PO",
            "rxNormId": "617314"
        },
        "patientPrescription": [{
                "prescribe": {
                    "sig": {
                        "drug": {
                            "brandName": "Lipitor",
                            "genericName": "atorvastatin calcium",
                            "form": "Tablet",
                            "strength": "10 mg",
                            "routeCode": "PO",
                            "rxNormId": "617314"
                        },
                        "dose": "1",
                        "doseUnit": "tablet",
                        "route": "PO",
                        "doseTiming": "once a day"
                    }
                },
                "createdAt": "2013-04-03T00:00:00-07:00"
            }
        ]
    }, {
        "drug": {
            "brandName": "Lasix",
            "genericName": "furosemide",
            "form": "Tablet",
            "strength": "20 mg",
            "routeCode": "PO",
            "rxNormId": "200801"
        },
        "patientPrescription": [{
                "prescribe": {
                    "sig": {
                        "drug": {
                            "brandName": "Lasix",
                            "genericName": "furosemide",
                            "form": "Tablet",
                            "strength": "20 mg",
                            "routeCode": "PO",
                            "rxNormId": "200801"
                        },
                        "dose": "1",
                        "doseUnit": "tablet",
                        "route": "PO",
                        "doseTiming": "once a day"
                    }
                },
                "createdAt": "2013-04-03T00:00:00-07:00"
            }
        ]
    }, {
        "drug": {
            "brandName": "Klor-Con 10",
            "genericName": "potassium chloride",
            "form": "tablet extended release",
            "strength": "10 mEq",
            "routeCode": "PO",
            "rxNormId": "628958"
        },
        "patientPrescription": [{
                "prescribe": {
                    "sig": {
                        "drug": {
                            "brandName": "Klor-Con 10",
                            "genericName": "potassium chloride",
                            "form": "tablet extended release",
                            "strength": "10 mEq",
                            "routeCode": "PO",
                            "rxNormId": "628958"
                        },
                        "dose": "1",
                        "doseUnit": "tablet",
                        "route": "PO",
                        "doseTiming": "once a day"
                    }
                },
                "createdAt": "2013-04-03T00:00:00-07:00"
            }
        ]
    }
]
ejancic commented 11 years ago

This is still happening and after looking at your JSON above I am noticing that you don't have NDCID's for the medications. Our medications key off of NDCID so omitting those values would be an issue.

Looking at the CCD export, there are no NDCID values there. We need to include those values.

Skwerl commented 11 years ago

OK, so CCD has RXNORM, and without NDCID, you're not able to import medications... Well, best way to fix this (or at least the easiest) is to add a row to the HTML table, like Chris did in all his XML fixes. It's straying farther away from a standard CCD format (but it would validate), but we already voided that warranty so to speak...

ejancic commented 11 years ago

If it validates we are fine. I actually think that Aaron will ask to see NDCID and RxNorm side by side for meds.

Do we need Chris's help to add the field?

On Apr 3, 2013, at 9:44 PM, Skwerl notifications@github.com wrote:

OK, so CCD has RXNORM, and without NDCID, you're not able to import medications... Well, best way to fix this (or at least the easiest) is to add a table to the HTML table, like Chris did in all his XML fixes. It's straying farther away from a standard CCD format (but it would validate), but we already voided that warranty so to speak...

— Reply to this email directly or view it on GitHub.

Skwerl commented 11 years ago

Nah, I can add the field. Working on it now...