Repository navigation
refactor: take the RXO segment the dosage builder is always given - #82
Merged
Merged
Conversation
Clears CodeQL alert 16 (js/unneeded-defensive-code) on transform. In `src/messages/medication-request.ts`, `buildDosageInstruction` typed its RXO segment as optional and guarded the dose range on it, but its one caller, `buildMedicationRequest`, has already returned when the order has no RXO. The parameter is now `Segment` and the always-true guard is gone; the dose range code runs as before. Output is unchanged: `test/messages/orders.test.ts` and `test/messages/tq1-timing.test.ts` pin `doseAndRate.doseRange` with and without TQ1, and they pass as before. A patch changeset. The gate ran locally in CI order: typecheck, lint, format, PHI scan, test, coverage, build, attw, conformance, the examples, and the house, dash, and public-surface checks. Items: SEC11.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Clears CodeQL alert 16 (js/unneeded-defensive-code) on transform.
In
src/messages/medication-request.ts,buildDosageInstructiontyped its RXO segment as optional and guarded the dose range on it, but its one caller,buildMedicationRequest, has already returned when the order has no RXO. The parameter is nowSegmentand the always-true guard is gone; the dose range code runs as before. Output is unchanged:test/messages/orders.test.tsandtest/messages/tq1-timing.test.tspindoseAndRate.doseRangewith and without TQ1, and they pass as before.A patch changeset. The gate ran locally in CI order: typecheck, lint, format, PHI scan, test, coverage, build, attw, conformance, the examples, and the house, dash, and public-surface checks.
Items: SEC11.