Skip to content

Comments

SL-1082 - Add date specimen received at lab question to lab workflow#279

Merged
mseaton merged 3 commits intomasterfrom
SL-1082
Feb 9, 2026
Merged

SL-1082 - Add date specimen received at lab question to lab workflow#279
mseaton merged 3 commits intomasterfrom
SL-1082

Conversation

@mseaton
Copy link
Member

@mseaton mseaton commented Feb 7, 2026

No description provided.

@mseaton mseaton requested review from cioan and mogoodrich February 7, 2026 20:44
};

export const DATETIME_CONCEPTS = [
"6234d61b-4c77-4af6-9bbb-533e44c03f24" // Date specimen received at laboratory
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Obviously if we were supporting this long term, we wouldn't do this, but this works for now

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair.

Can we add a comment noting this on the odd chance this OWA sticks around for a bit and we forget why we did this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

else {
val = val.substring(0, 10)
}
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This whole thing should really be unnecessary, but I'd rather hack here than in the REST module, just to get this working. That said, the REST module seems a bit...odd. Basically, the REST module uses the obs.setValueFromString method to set datetime values, which are required to be yyyy-MM-dd if the concept datatype is date, and required to be (very strangely) yyyy-MM-dd hh:mm if the concept datatype is a datetime/timestamp. That just doesn't seem right, but I'd rather we ticket / discuss separately from this. So here, I'm just hacking in some handling where - if a date value is coming through with the full date/time/timezone information as is currently happening, just reformat it to those expected formats. Hopefully this works for as long as we need it to, before we put this out to pasture.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that seems wrong for the datetime use case... I feel like I might have ran into this recently, but a quick OpenMRS Jira search didn't turn up anything.

Overall, for date-only, I do think this is the correct behavior.

Copy link
Member

@cioan cioan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @mseaton !

Copy link
Member

@mogoodrich mogoodrich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple comments but LGTM, thanks @mseaton !

else {
val = val.substring(0, 10)
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that seems wrong for the datetime use case... I feel like I might have ran into this recently, but a quick OpenMRS Jira search didn't turn up anything.

Overall, for date-only, I do think this is the correct behavior.

};

export const DATETIME_CONCEPTS = [
"6234d61b-4c77-4af6-9bbb-533e44c03f24" // Date specimen received at laboratory
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair.

Can we add a comment noting this on the odd chance this OWA sticks around for a bit and we forget why we did this?

@mseaton mseaton merged commit d0a7fa5 into master Feb 9, 2026
1 check passed
@mseaton mseaton deleted the SL-1082 branch February 9, 2026 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants