Skip to content

Add RealTimePcrDevice field and dynamic interpretation sentences for BD-MAX/Sacace#199

Merged
markusrt merged 5 commits intomasterfrom
copilot/integrate-nsh-rt-pcr-device
Feb 24, 2026
Merged

Add RealTimePcrDevice field and dynamic interpretation sentences for BD-MAX/Sacace#199
markusrt merged 5 commits intomasterfrom
copilot/integrate-nsh-rt-pcr-device

Conversation

Copy link
Contributor

Copilot AI commented Feb 11, 2026

New lab device NSH Real-Time-PCR (BD-MAX) needs to be recorded alongside existing NHS Real-Time-PCR (Sacace). Rather than duplicating method fields, a device type is stored per dataset and interpretation sentences dynamically reflect the device used.

Model & Schema

  • New RealTimePcrDevice enum: NotDetermined, Sacace ("NHS Meningitis Real Tm, Firma Sacace"), BdMax ("BD MAX")
  • Added RealTimePcrDevice property to IsolateCommon (inherited by both Hi and Nm isolates)
  • Migration adds column to both MeningoIsolates and Isolates tables
  • Display names changed from "NHS Real-Time-PCR" → "Real-Time-PCR" (now device-agnostic)

Dynamic Interpretation

  • TypingTemplates.json: Replaced hardcoded "Real-Time-PCR (NHS Meningitis Real Tm, Firma Sacace)" with "Real-Time-PCR ({RealTimePcrDevice:enum()})"
  • MeningoIsolateInterpretation.cs: Attribute field now formatted via Smart.Format() (previously only Value was)
"RealTimePCRNegative": {
    "Attribute": "Real-Time-PCR ({RealTimePcrDevice:enum()})",
    "Value": "Negativ für bekapselte Neisseria meningitidis, ..."
}

Exports

  • All 5 export definitions (Meningo/Haemophilus Laboratory, RKI, IRIS) include RealTimePcrDevice field

Views

  • Device radio buttons added to both MeningoIsolate/Edit.cshtml and Isolate/Edit.cshtml

Tests

  • 11 test isolates updated with explicit RealTimePcrDevice = RealTimePcrDevice.Sacace
  • Export test column counts incremented, header names updated

Note: The migration .resx was bootstrapped from the previous migration's snapshot. The Target model hash should be regenerated via Add-Migration on a Windows dev machine before deploying.

Original prompt

This section details on the original issue you should resolve

<issue_title>Integration of NSH Real-Time-PCR (BD-MAX) Device and Dynamic Interpretation Sentences</issue_title>
<issue_description>Summary
Integrate the new laboratory device NSH Real-Time-PCR (BD-MAX) into NRZMHiDB and adapt related data handling and interpretation logic.

Requirements:

  • Add new method fields for NSH Real-Time-PCR (BD-MAX) alongside existing NHS Real-Time-PCR (Sacace) methods for both Haemophilus influenzae (Hi) and Neisseria meningitidis (Nm) molecular typing.
  • Ensure both NHS Real-Time-PCR and NSH Real-Time-PCR can be recorded for Hi; the Data/TestResult logic remains unchanged.
  • Store the device type (e.g., BD-MAX or Sacace) with each dataset, rather than duplicating method fields.
  • In data exports, make clear which device was used in the result field.
  • Update the interpretation sentences for Meningococci (Nm-PCR) to reflect the device used by replacing potential hard-coded device names with a dynamic placeholder (e.g., method/device name).

Acceptance criteria:

  • Both NHS and NSH Real-Time-PCR methods are available for Hi and Nm, with correct device attribution throughout the application (data entry, display, exports).
  • Interpretation sentences for Meningococci molecular typing dynamically show the device used based on stored data.
  • Export and database schemas are updated to show or use the device name as well.

Background information:

  • NSH Real-Time-PCR (BD-MAX) is a new device; NHS Real-Time-PCR (Sacace) continues to be used occasionally.
  • The core interpretation logic remains unchanged, only the device name in sentences needs to be dynamic.

Relevant code references:

Related communication:
See email conversation with Heike for context and rationale.
</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 3 commits February 11, 2026 06:42
…ecking Real-Time-PCR typing attribute

Co-authored-by: markusrt <299753+markusrt@users.noreply.github.com>
…er rename

Co-authored-by: markusrt <299753+markusrt@users.noreply.github.com>
Co-authored-by: markusrt <299753+markusrt@users.noreply.github.com>
Copilot AI changed the title [WIP] Integrate NSH Real-Time-PCR device with data handling Add RealTimePcrDevice field and dynamic interpretation sentences for BD-MAX/Sacace Feb 11, 2026
Copilot AI requested a review from markusrt February 11, 2026 06:52
@markusrt markusrt marked this pull request as ready for review February 24, 2026 04:11
@markusrt markusrt merged commit 7747e77 into master Feb 24, 2026
2 checks passed
@markusrt markusrt deleted the copilot/integrate-nsh-rt-pcr-device branch February 24, 2026 04:12
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.

Integration of NSH Real-Time-PCR (BD-MAX) Device and Dynamic Interpretation Sentences

2 participants