CDCgov / phdi

https://cdcgov.github.io/dibbs-site/
Creative Commons Zero v1.0 Universal
32 stars 14 forks source link

Fix standardize_dob #2145

Closed m-goggins closed 1 month ago

m-goggins commented 1 month ago

Context: While preparing the demo for WA, I noticed that the /fhir/harmonization/standardization/standardize_dob endpoint doesn't work as expected. When you hit the endpoint with the following bundle, the DOB does not update even when you change the format parameter. I wouldn't say this is a high priority but something seems off and I couldn't figure out what was wrong (the base func vs. the container implementation) from a quick look at the code.

Passing in DOB as any format other than YYYY-MM-DD results in no change, even when you pass in the appropriate format param.

{
    "data": {
        "resourceType": "Bundle",
        "identifier": {
            "value": "a very contrived FHIR bundle"
        },
        "entry": [
            {
                "resource": {
                    "resourceType": "Organization",
                    "id": "some-org-we-dont-care-about"
                }
            },
            {
                "resource": {
                    "resourceType": "Patient",
                    "id": "7be80751-d0cf-4055-9b7f-1ed65db5604e",
                    "identifier": [
                        {
                            "value": "123456",
                            "type": {
                                "coding": [
                                    {
                                        "code": "MR",
                                        "system": "http://terminology.hl7.org/CodeSystem/v2-0203",
                                        "display": "Medical record number"
                                    }
                                ]
                            },
                            "system": "urn...no idea"
                        }
                    ],
                    "name": [
                        {
                            "family": "doe",
                            "given": [
                                "John ",
                                " Danger "
                            ],
                            "use": "official"
                        }
                    ],
                    "birthDate": "07102000",
                    "gender": "female",
                    "address": [
                        {
                            "line": [
                                "123 Fake St",
                                "Unit #F"
                            ],
                            "BuildingNumber": "123",
                            "city": "Faketon",
                            "state": "NY",
                            "postalCode": "10001-0001",
                            "country": "USA",
                            "use": "home"
                        }
                    ],
                    "telecom": [
                        {
                            "use": "home",
                            "system": "phone",
                            "value": "123-456-7890"
                        },
                        {
                            "value": "johndanger@doe.net",
                            "system": "email"
                        }
                    ]
                },
                "request": {
                    "method": "GET",
                    "url": "testing for entry with no resource"
                }
            }
        ]
    }
}
robertmitchellv commented 1 month ago

thank you for flagging! i removed the viper label and added aie so that we can pull it into our board.