Skwerl / hs-util

0 stars 0 forks source link

CCR Import: Entire medication object not getting imported #27

Closed ejancic closed 11 years ago

ejancic commented 11 years ago

This field: Screen Shot 2013-04-01 at 9 38 08 PM

should get imported into the createdAt value within the medication object (JSON below) in addition to the written date. Use the same format that you're already using to import this into writtenDate

"drug": { "rcopiaId": null, "ndcid": "00039005110", "brandName": "Diabeta", "genericName": "glyburide", "fullDescription": null, "brandType": null, "form": "tablet, extended release", "strength": "2.5 mg", "routeCode": null, "rxNormType": null, "rxNormId": "205875", "drugGroup": null }, "note": [], "patientPrescription": [ { "prescribe": { "prescribeIdentity": null, "patientIdentity": null, "patientExternalIdentity": null, "pharmacyIdentity": null, "hasScheduledDrug": false, "stopDate": null, "addToMedicationList": false, "sig": { "drug": { "rcopiaId": null, "ndcid": "00039005110", "brandName": "Diabeta", "genericName": "glyburide", "fullDescription": null, "brandType": null, "form": "tablet, extended release", "strength": "2.5 mg", "routeCode": null, "rxNormType": null, "rxNormId": "205875", "drugGroup": null }, "action": null, "dose": "1", "doseUnit": "tablet", "route": null, "doseTiming": "bid", "doseOther": null, "duration": null, "quantity": "100", "quantityUnits": "tablet", "refills": null, "substitutionPermitted": false, "otherNotes": null, "patientNotes": "", "comments": null, "schedule": null, "writtenDate": "2005-03-29T05:00:00Z", "effectiveDate": null, "lastFillDate": null, "soldDate": null }, "checkId": null, "signaturePassword": null, "prescriberOrderNumber": null, "rxReferenceNumber": null, "formularyNote": null, "interactionNote": null, "allergyReaction": null, "interactionReaction": null, "drugInteractionCheckPerformed": false, "icd9": null, "ePrescribe": null, "createdBy": null, "createdByFirstName": null, "createdByLastName": null }, "createdAt": null, (GOES HERE) "createdBy": null, "active": false }

ejancic commented 11 years ago

I'm not seeing any medication data at all so something broke here

Skwerl commented 11 years ago

I am seeing medications JSON coming from the CMTS:

"medication": [{
        "drug": {
            "brandName": "Diabeta",
            "genericName": "glyburide",
            "form": "tablet, extended release",
            "strength": "2.5 mg",
            "routeCode": "PO",
            "rxNormId": "205875"
        },
        "patientPrescription": [{
                "prescribe": {
                    "sig": {
                        "drug": {
                            "brandName": "Diabeta",
                            "genericName": "glyburide",
                            "form": "tablet, extended release",
                            "strength": "2.5 mg",
                            "routeCode": "PO",
                            "rxNormId": "205875"
                        },
                        "dose": "1",
                        "doseUnit": "tablet",
                        "route": "PO",
                        "doseTiming": "bid",
                        "quantity": "100",
                        "quantityUnits": "tablet",
                        "patientNotes": "",
                        "writtenDate": "2005-03-29T05:00:00Z"
                    }
                },
                "createdAt": "2005-03-28T21:00:00-08:00"
            }
        ]
    }, {
        "drug": {
            "brandName": "Lipitor",
            "genericName": "atorvastatin calcium",
            "form": "tablet, extended release",
            "strength": "10 mg",
            "routeCode": "PO",
            "rxNormId": "617314"
        },
        "patientPrescription": [{
                "prescribe": {
                    "sig": {
                        "drug": {
                            "brandName": "Lipitor",
                            "genericName": "atorvastatin calcium",
                            "form": "tablet, extended release",
                            "strength": "10 mg",
                            "routeCode": "PO",
                            "rxNormId": "617314"
                        },
                        "dose": "1",
                        "doseUnit": "tablet",
                        "route": "PO",
                        "doseTiming": "bid",
                        "quantity": "100",
                        "quantityUnits": "tablet",
                        "patientNotes": "",
                        "writtenDate": "2005-03-29T05:00:00Z"
                    }
                },
                "createdAt": "2005-03-28T21:00:00-08:00"
            }
        ]
    }, {
        "drug": {
            "brandName": "Lasix",
            "genericName": "furosemide",
            "form": "tablet, extended release",
            "strength": "20 mg",
            "routeCode": "PO",
            "rxNormId": "200801"
        },
        "patientPrescription": [{
                "prescribe": {
                    "sig": {
                        "drug": {
                            "brandName": "Lasix",
                            "genericName": "furosemide",
                            "form": "tablet, extended release",
                            "strength": "20 mg",
                            "routeCode": "PO",
                            "rxNormId": "200801"
                        },
                        "dose": "1",
                        "doseUnit": "tablet",
                        "route": "PO",
                        "doseTiming": "bid",
                        "quantity": "100",
                        "quantityUnits": "tablet",
                        "patientNotes": "",
                        "writtenDate": "2005-03-29T05:00:00Z"
                    }
                },
                "createdAt": "2005-03-28T21:00:00-08:00"
            }
        ]
    }, {
        "drug": {
            "brandName": "Klor-Con",
            "genericName": "potassium chloride",
            "form": "tablet, extended release",
            "strength": "10 mEq",
            "routeCode": "PO",
            "rxNormId": "628958"
        },
        "patientPrescription": [{
                "prescribe": {
                    "sig": {
                        "drug": {
                            "brandName": "Klor-Con",
                            "genericName": "potassium chloride",
                            "form": "tablet, extended release",
                            "strength": "10 mEq",
                            "routeCode": "PO",
                            "rxNormId": "628958"
                        },
                        "dose": "1",
                        "doseUnit": "tablet",
                        "route": "PO",
                        "doseTiming": "bid",
                        "quantity": "100",
                        "quantityUnits": "tablet",
                        "patientNotes": "",
                        "writtenDate": "2005-03-29T05:00:00Z"
                    }
                },
                "createdAt": "2005-03-28T21:00:00-08:00"
            }
        ]
    }
]
ejancic commented 11 years ago

This might be same as #38 where we aren't passing the NDCID as part of the import process. I have confirmed that NDCID is in the ccr.xml file

Skwerl commented 11 years ago

The sample CCR I have has RXNORM codes, no NDC IDs. Can I see your ccr.xml? I thought there was only one...

ejancic commented 11 years ago

Here's the XML content for medication (I thought there was only one too). That 0007105540 number is the NDCID

BB0024 Prescription Date 2005-03-29T05:00:00Z Medication Active AA0002 atorvastatin calcium Lipitor 00071015540 NDC 2012 10 mg
tablet, extended release
100 tablet 1 tablet PO bid BB0007 0

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

The sample CCR I have has RXNORM codes, no NDC IDs. Can I see your ccr.xml? I thought there was only one...

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

ejancic commented 11 years ago

XML is hosted here: ccr.xml http://api-docs.hs.chaoslabs.com:9080/files/