OP-1037 Add the administrative consensus flag to PatientConsensus - #1620
Open
giuseppesorge wants to merge 2 commits into
Open
OP-1037 Add the administrative consensus flag to PatientConsensus#1620giuseppesorge wants to merge 2 commits into
giuseppesorge wants to merge 2 commits into
Conversation
Add a new PTC_ADMINISTRATIVE boolean flag to the patient consensus, mirroring the existing service flag end-to-end: PatientConsensus.administrativeFlag (field, accessors, constructor, toString); a new migration sql/step_a124_patient_consensus_administrative_flag.sql (ALTER ADD COLUMN AFTER PTC_CONSENSUS, registered in step_04) for existing databases; and the column/value added to load_demo_data. The original step_93 CREATE is intentionally left unchanged so the step sequence does not double-add the column. Tests updated to set/assert the new flag. Verified on MariaDB: the step_93 -> step_a124 sequence adds the column with no duplicate error and back-fills it to 0; the load_demo column count matches its INSERT values. NB: step number a124 may need renumbering at merge time if it collides with another open migration PR.
…rative-consensus-flag # Conflicts: # sql/step_04_all_following_steps.sql
Contributor
Author
|
Merged One thing for whoever merges first: this branch claims |
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.
OP-1037 — Administrative Service Flag (core)
Adds a new
administrativeboolean flag (columnPTC_ADMINISTRATIVE) to the Patient Consensus feature, mirroring the existingserviceflag (PTC_SERVICE) end-to-end. Per the ticket, the flag records the administrative consensus for additional services (Portal), so the hospital can block the service for administrative reasons against the patient's will.Changes
PatientConsensusmodel: newadministrativeFlagfield, accessors, constructor parameter andtoString().sql/step_a124_patient_consensus_administrative_flag.sql(ALTER TABLE OH_PATIENT_CONSENSUS ADD COLUMN PTC_ADMINISTRATIVE TINYINT(1) NOT NULL DEFAULT 0 AFTER PTC_CONSENSUS), registered instep_04_all_following_steps.sqlafterstep_93so existing databases get the column.sql/load_demo_data.sql: the column and a default value added to the demooh_patient_consensusCREATE and its INSERTs.step_93_patient_consensus_table.sqlCREATE is intentionally left unchanged, so a fresh install (step_93 then step_a124) does not double-add the column.Note for reviewers
a124:a118is the next free number ondevelop, but several other open migration PRs reservea118–a123; this usesa124to avoid an immediate collision. Happy to renumber on merge.step_04_all_following_steps.sql(the fresh-install aggregator thatcreate_all_*source). The documented incremental upgrade chain undersql/update/currently ends atstep_a117(inupdate_1_14-1_15.sql); like the other open post-1.15 migration PRs,step_a124will need to be rolled into the next release.'supdate_1_15-1_16.sqlso databases upgraded viasql/updatealso get the column.Testing
org.isf.patconsensus.Tests(6) andorg.isf.patient.Tests(71) green.step_93→step_a124sequence adds the column with no duplicate-column error and back-fills it to 0; theload_demo_datacolumn count matches its INSERT values;create_all_demo(sourcingstep_04thenload_demo_data) yields the column.Part of OP-1037: API informatici/openhospital-api#592, GUI informatici/openhospital-gui#2222.