DT or DTM Year only = Year - 1
sgtcmofo opened this issue · 3 comments
sgtcmofo commented
Using ORU_R01 template and noticed that if just a year is passed into it, it is converted to the year -1.
Data to replicate:
HL7 Line:
OBX|52|DT|77999-3^Only Year^LN||2007||||||F
Fhir Json: (valueDateTime = 2006 instead of 2007)
"resource": {
"resourceType": "Observation",
"id": "6f7f4b1c-94ff-db39-c6f1-7d35179b1f09",
"status": "final",
"code": {
"coding": [
{
"code": "77999-3",
"display": "Only Year",
"system": "http://loinc.org"
}
]
},
"valueDateTime": "2006",
"subject": {
"reference": "Patient/30f0d5c9-2d13-7723-faf3-d63cbdab10bd"
},
"extension": [
{
"url": "http://example.com/v2-to-fhir-converter/Observation_Status",
"valueCodeableConcept": {
"coding": [
{
"code": "F",
"display": "Final",
"system": "http://terminology.hl7.org/CodeSystem/v2-0085"
}
],
"text": "Final"
}
}
],
"basedOn": [
{
"reference": "ServiceRequest/9e3c58d6-4204-f129-0dcc-d2d14fbe9b89"
}
]
},
evachen96 commented
Hi @sgtcmofo ! Are you still getting this error? We are not able to reproduce this - are you able to provide more information for us to investigate?
sgtcmofo commented
I am not currently seeing the same results. It converted it correctly just now.
OBX|51|DT|9999-1^Only Year^LN|1|2013||||||F
{
"fullUrl": "urn:uuid:596efb76-0220-e501-3163-60889ac8d349",
"resource": {
"resourceType": "Observation",
"id": "596efb76-0220-e501-3163-60889ac8d349",
"status": "final",
"code": {
"coding": [
{
"code": "9999-1",
"display": "Only Year",
"system": "http://loinc.org"
}
]
},
"valueDateTime": "2013",
"subject": {
"reference": "Patient/30f0d5c9-2d13-7723-faf3-d63cbdab10bd"
},
"extension": [
{
"url": "http://example.com/v2-to-fhir-converter/Observation_Status",
"valueCodeableConcept": {
"coding": [
{
"code": "F",
"display": "Final",
"system": "http://terminology.hl7.org/CodeSystem/v2-0085"
}
],
"text": "Final"
}
}
],
"basedOn": [
{
"reference": "ServiceRequest/9e3c58d6-4204-f129-0dcc-d2d14fbe9b89"
}
]
},
evachen96 commented
Awesome, thanks!