MedDeviceGuideMedDeviceGuide
Back

Validating Decimal Commas Before Medical Device Calculations

Use a declared source format to interpret decimal commas in medical device imports. Test that ambiguous values and stale results stay out of the calculation workflow.

DJ Fang
DJ Fang
Lead Editor @ MedDeviceGuide.com, RAC | Life Sciences Go-to-Market Strategy
Published 2026-11-23Last reviewed 2026-11-2312 min read

When medical device software imports a field containing 1,234, use the interface’s declared numeric format to decide what the field means. Neither the punctuation alone nor the workstation’s language settings can tell you whether the sender meant a fraction or a grouped integer. When the source format cannot be established, keep the affected value out of calculation and give the import a defined hold or rejection status.

This check belongs at the input boundary, before any stored quantity can be rounded, converted or exported. If the field is an identifier, specify it as text and preserve its characters through the interface, as in specimen barcode verification.

Which value does 1,234 mean?

Under a declared es-ES-style decimal-comma profile, 1,234 means 1.234. Under a declared en-US-style decimal-point profile with comma grouping enabled, it means 1234. A profile name is shorthand for a documented grammar, including which grouping marks are allowed. For the underlying distinctions, see Microsoft Learn’s parsing documentation and Unicode Technical Standard #35, Part 3.

The two interpretations differ by a factor of 1,000. If a synthetic field accepts values from 0.5 to 2000, both interpretations fall within range. Try that pair when designing a verification case. A range check can pass even when software has assigned the wrong magnitude. A practical example of explicit format selection is LabRuns, which documents one convention per study and shows the two readings in its manual on numbers, units and identifiers.

Declared profileMeaning of commaParsed value of 1,234Next step
es-ES-style decimal commaDecimal mark1.234Check device limits
en-US-style decimal point with groupingThousands separator1234Check device limits
Missing or conflicting declarationUnresolvedNo parsed valueHold or reject before calculation

What an analyzer field notice shows

In a March 5, 2025 field safety notice, Beckman Coulter identified the DxC 500i Access 2 Module (REF C13252) running software versions 1.3.0 or 1.3.2. With a comma-decimal regional setting selected at installation, a value such as 1.25 in the Assay Protocol File could load as 125. Beckman Coulter identified Access Toxo IgM II (REF 34470) as the only affected assay in that action and said falsely non-reactive results could occur. See Beckman Coulter field safety notice FA-25026, hosted by Swissmedic.

The notice gives a concrete example of a well-formed source value acquiring the wrong magnitude under a different runtime setting. As a verification case, load the same fixed-format file under matching and differing workstation locales. Compare the value received by the calculation component with the independently specified value. A successful upload or an in-range number on screen leaves the magnitude at that boundary unverified.

Specify the source format before parsing

Write down where the source format comes from and when the importer can rely on it. A fixed machine grammar can be part of the interface specification. An interface that accepts localized text can use a versioned profile assigned to an approved source or supplied in validated file metadata. Separate that choice from the delimiter used to frame records and from the workstation locale used to display numbers. Microsoft Learn’s discussion of parsing and CSV.

flowchart TD
  A["Frame the record and validate the expected field type"] -->|Valid| B["Resolve the declared numeric source format"]
  B -->|Resolved| C["Validate the full token against the declared grammar"]
  C -->|Valid| D["Parse the numeric value and check device limits"]
  D -->|Within limits| E["Make the accepted value available to calculation"]
  A -->|Invalid record or field type| X["Block the affected input and report its disposition"]
  B -->|Missing or conflicting format| X
  C -->|Invalid numeric syntax| X
  D -->|Outside limits| X
Numeric import checks from record framing to calculation eligibility.

Source-profile precedence and syntax limits

Specify what happens when declarations disagree. For example, an import manifest may identify an approved comma-grouped profile while trusted file metadata identifies a decimal-comma profile. If the interface recognizes both as format declarations, record the conflict and reject the import under the example policy below. A missing required declaration puts the input on hold. Give each disposition a distinct reason so the operator can correct the source information and resubmit through the normal validation path.

A file-wide profile only works when rows actually follow it. A token from the wrong source may still satisfy the declared grammar. In a file declared comma-grouped, for example, a decimal-comma 1,234 could pass every syntax check and become 1234. When several systems feed one importer, associate the format with each controlled source, or require those systems to deliver a shared machine format. Verify that routing or merging a file cannot silently discard its format declaration. For a separate labeling workflow, see device label translation and release reconciliation.

Distinguish CSV framing from JSON number grammar

Distinguish a malformed record from a well-framed field with invalid numeric syntax. That distinction tells the team whether to investigate the sender’s record layout, the receiver’s field contract or the numeric grammar.

  • Comma-delimited CSV. In the two-column dialect used below, S001,"1,234" frames into two fields and passes the intact 1,234 to the numeric check. Unquoted S009,1,234 frames into three fields and fails the expected field count. The quotes preserve the comma within one field. The profile determines what the comma means. See RFC 4180, §2 for the common CSV format this dialect follows.

  • JSON with a numeric field. In {"value":1.234}, the number uses the JSON grammar, which specifies a period for the fractional part. {"value":"1,234"} is valid JSON with a string field, so an interface requiring a number rejects it at type validation. {"value":1,234} fails object syntax. If your protocol deliberately carries localized numeric text in a JSON string, define the field’s text grammar in the interface. See RFC 8259, §§2–4 and 6.

Full-field validation and lenient-parsing hazards

Some parsing libraries offer lenient matching. For example, the Unicode specification describes how a lenient parser may treat certain symbols as equivalent. A device interface can define a narrower set of accepted characters. Pin the allowed digit set and whitespace rules and test the actual code points at the boundary. A regular space and a nonbreaking space can look alike in a review even when only one is accepted. See UTS #35’s section on lenient parsing.

Apply the specified grammar to the entire field. Check sign and grouping positions, reject trailing characters, and specify how blanks and exponent notation are handled. Include a paired blank and explicit zero so a default-value substitution cannot pass unnoticed. A separator should only be removed after the full field has matched the profile’s grouping grammar. In a decimal-comma profile that forbids grouping, 1.25 should fail syntax instead of becoming 125.

CheckExample failureEffect on the affected input
Record framingA two-column CSV row splits into three fieldsReject the malformed record
Field typeJSON string in a field declared numericReject the type mismatch
Source formatMissing or conflicting numeric profileHold an undeclared input or reject a conflict under the fixture policy
Full-field syntaxUnexpected separator, invalid grouping, blank or trailing textReject the field
Device limitsParsed value exceeds the declared rangeBlock calculation and record the range failure
Result handlingA held import follows a valid runKeep the previous result associated with the previous import and show the current hold status

Build a parser test set with expected outcomes

The 22 synthetic cases below use a generic field named value. Each payload is UTF-8. The CSV dialect has a sample_id,value header, comma-delimited fields, double-quote escaping and CRLF between records. The JSON dialect requires an object with a string sample_id and a numeric value. A JSON string containing a number-shaped token fails that field contract.

The fixture defines four CSV profiles. All use ASCII digits, require digits on either side of a decimal mark when one appears, and exclude whitespace, leading plus signs and exponents. The decimal-comma profile uses a comma for fractions and forbids grouping. decimal-comma-signed additionally permits one leading minus sign. decimal-point uses a period for fractions and forbids grouping. comma-grouped additionally allows commas in the integer part, with one to three digits before the first comma and exactly three after each comma. The JSON number follows the RFC 8259 grammar. After parsing, the same inclusive synthetic range of −10,000 to 10,000 applies to all cases.

CaseInput and setupExpected result
NL-01 / NL-02Quoted 1,234 with two declared profiles1.234 or 1234, according to the profile
NL-03Quoted 1,234 with declared decimal-comma profile and en-US workstation locale1.234
NL-04 / NL-05Same token with missing format or conflicting declarationsHold on missing format and reject on conflict
NL-08 / NL-091.25 under strict decimal-comma rules or 1,234 without CSV quotesReject at syntax or record framing, respectively
NL-10–NL-12JSON number, JSON string and malformed JSON objectAccept 1.234, reject the string’s type, or reject at framing
NL-20Quoted 99,999 under the comma-grouped profileParse 99999 and reject at the range check
NL-01 → NL-21 → NL-22Valid import, format hold, then a valid import with a different valueNo current result during the hold. The recovery run uses 2.5.

Copy the JSON Lines fixture as one object per line. Treat sourceDeclarations as test setup metadata supplied outside the CSV or JSON payload. The harness supplies the configured interface profile, manifest or validated file metadata where specified. For JSON, the numeric field contract fixes the grammar. An empty declarations object in a localized CSV case leaves the format unresolved. Expected decimals are exact strings in period notation. A null expectation means the import never produced a parsed decimal for that case. previousCaseId marks the cases to run in succession without resetting result state.

{"caseId":"NL-01","requirementRef":"SRS-IMP-001","riskControlRef":"RC-LOC-01","transport":"csv","dialect":"rfc4180-comma-2col","sourceDeclarations":{"interface":"decimal-comma"},"runtimeLocale":"es-ES","rawPayload":"sample_id,value\r\nS001,\"1,234\"","expectedStage":"complete","expectedOutcome":"accept","expectedDecimal":"1.234","expectedDisposition":"eligible-for-calculation","reachesCalculation":true,"expectedCurrentResult":{"sampleId":"S001","value":"2.468"}}
{"caseId":"NL-02","requirementRef":"SRS-IMP-001","riskControlRef":"RC-LOC-01","transport":"csv","dialect":"rfc4180-comma-2col","sourceDeclarations":{"interface":"comma-grouped"},"runtimeLocale":"en-US","rawPayload":"sample_id,value\r\nS002,\"1,234\"","expectedStage":"complete","expectedOutcome":"accept","expectedDecimal":"1234","expectedDisposition":"eligible-for-calculation","reachesCalculation":true}
{"caseId":"NL-03","requirementRef":"SRS-IMP-002","riskControlRef":"RC-LOC-02","transport":"csv","dialect":"rfc4180-comma-2col","sourceDeclarations":{"fileMetadata":"decimal-comma"},"runtimeLocale":"en-US","rawPayload":"sample_id,value\r\nS003,\"1,234\"","expectedStage":"complete","expectedOutcome":"accept","expectedDecimal":"1.234","expectedDisposition":"eligible-for-calculation","reachesCalculation":true}
{"caseId":"NL-04","requirementRef":"SRS-IMP-002","riskControlRef":"RC-LOC-02","transport":"csv","dialect":"rfc4180-comma-2col","sourceDeclarations":{},"runtimeLocale":"en-US","rawPayload":"sample_id,value\r\nS004,\"1,234\"","expectedStage":"source-profile-resolution","expectedOutcome":"hold","expectedDecimal":null,"expectedDisposition":"hold-unresolved-source-format","reachesCalculation":false}
{"caseId":"NL-05","requirementRef":"SRS-IMP-002","riskControlRef":"RC-LOC-02","transport":"csv","dialect":"rfc4180-comma-2col","sourceDeclarations":{"fileMetadata":"decimal-comma","manifest":"comma-grouped"},"runtimeLocale":"en-US","rawPayload":"sample_id,value\r\nS005,\"1,234\"","expectedStage":"source-profile-resolution","expectedOutcome":"reject","expectedDecimal":null,"expectedDisposition":"reject-conflicting-source-format","reachesCalculation":false}
{"caseId":"NL-06","requirementRef":"SRS-IMP-001","riskControlRef":"RC-LOC-01","transport":"csv","dialect":"rfc4180-comma-2col","sourceDeclarations":{"interface":"decimal-comma"},"runtimeLocale":"en-US","rawPayload":"sample_id,value\r\nS006,\"1,25\"","expectedStage":"complete","expectedOutcome":"accept","expectedDecimal":"1.25","expectedDisposition":"eligible-for-calculation","reachesCalculation":true}
{"caseId":"NL-07","requirementRef":"SRS-IMP-001","riskControlRef":"RC-LOC-01","transport":"csv","dialect":"rfc4180-comma-2col","sourceDeclarations":{"interface":"decimal-point"},"runtimeLocale":"es-ES","rawPayload":"sample_id,value\r\nS007,1.25","expectedStage":"complete","expectedOutcome":"accept","expectedDecimal":"1.25","expectedDisposition":"eligible-for-calculation","reachesCalculation":true}
{"caseId":"NL-08","requirementRef":"SRS-IMP-003","riskControlRef":"RC-LOC-03","transport":"csv","dialect":"rfc4180-comma-2col","sourceDeclarations":{"interface":"decimal-comma"},"runtimeLocale":"es-ES","rawPayload":"sample_id,value\r\nS008,1.25","expectedStage":"full-field-syntax","expectedOutcome":"reject","expectedDecimal":null,"expectedDisposition":"reject-unexpected-period","reachesCalculation":false}
{"caseId":"NL-09","requirementRef":"SRS-IMP-004","riskControlRef":"RC-FRM-01","transport":"csv","dialect":"rfc4180-comma-2col","sourceDeclarations":{"interface":"decimal-comma"},"runtimeLocale":"es-ES","rawPayload":"sample_id,value\r\nS009,1,234","expectedStage":"record-framing","expectedOutcome":"reject","expectedDecimal":null,"expectedDisposition":"reject-field-count-mismatch-3-vs-2","reachesCalculation":false}
{"caseId":"NL-10","requirementRef":"SRS-IMP-004","riskControlRef":"RC-FRM-02","transport":"json","dialect":"rfc8259-object-number","sourceDeclarations":{"fieldContract":"json-number"},"runtimeLocale":"es-ES","rawPayload":"{\"sample_id\":\"S010\",\"value\":1.234}","expectedStage":"complete","expectedOutcome":"accept","expectedDecimal":"1.234","expectedDisposition":"eligible-for-calculation","reachesCalculation":true}
{"caseId":"NL-11","requirementRef":"SRS-IMP-004","riskControlRef":"RC-FRM-02","transport":"json","dialect":"rfc8259-object-number","sourceDeclarations":{"fieldContract":"json-number"},"runtimeLocale":"es-ES","rawPayload":"{\"sample_id\":\"S011\",\"value\":\"1,234\"}","expectedStage":"schema-field-type","expectedOutcome":"reject","expectedDecimal":null,"expectedDisposition":"reject-string-where-json-number-required","reachesCalculation":false}
{"caseId":"NL-12","requirementRef":"SRS-IMP-004","riskControlRef":"RC-FRM-02","transport":"json","dialect":"rfc8259-object-number","sourceDeclarations":{"fieldContract":"json-number"},"runtimeLocale":"es-ES","rawPayload":"{\"sample_id\":\"S012\",\"value\":1,234}","expectedStage":"record-framing","expectedOutcome":"reject","expectedDecimal":null,"expectedDisposition":"reject-invalid-json-grammar","reachesCalculation":false}
{"caseId":"NL-13","requirementRef":"SRS-IMP-003","riskControlRef":"RC-LOC-03","transport":"csv","dialect":"rfc4180-comma-2col","sourceDeclarations":{"interface":"comma-grouped"},"runtimeLocale":"en-US","rawPayload":"sample_id,value\r\nS013,\"1,23,45\"","expectedStage":"full-field-syntax","expectedOutcome":"reject","expectedDecimal":null,"expectedDisposition":"reject-invalid-grouping-pattern","reachesCalculation":false}
{"caseId":"NL-14","requirementRef":"SRS-IMP-003","riskControlRef":"RC-LOC-03","transport":"csv","dialect":"rfc4180-comma-2col","sourceDeclarations":{"interface":"decimal-comma"},"runtimeLocale":"es-ES","rawPayload":"sample_id,value\r\nS014,\"1,234abc\"","expectedStage":"full-field-syntax","expectedOutcome":"reject","expectedDecimal":null,"expectedDisposition":"reject-trailing-non-numeric-characters","reachesCalculation":false}
{"caseId":"NL-15","requirementRef":"SRS-IMP-003","riskControlRef":"RC-LOC-04","transport":"csv","dialect":"rfc4180-comma-2col","sourceDeclarations":{"interface":"decimal-comma"},"runtimeLocale":"es-ES","rawPayload":"sample_id,value\r\nS015,\"\"","expectedStage":"full-field-syntax","expectedOutcome":"reject","expectedDecimal":null,"expectedDisposition":"reject-blank","reachesCalculation":false}
{"caseId":"NL-16","requirementRef":"SRS-IMP-003","riskControlRef":"RC-LOC-04","transport":"csv","dialect":"rfc4180-comma-2col","sourceDeclarations":{"interface":"decimal-comma"},"runtimeLocale":"es-ES","rawPayload":"sample_id,value\r\nS016,0","expectedStage":"complete","expectedOutcome":"accept","expectedDecimal":"0","expectedDisposition":"eligible-for-calculation","reachesCalculation":true}
{"caseId":"NL-17","requirementRef":"SRS-IMP-003","riskControlRef":"RC-LOC-03","transport":"csv","dialect":"rfc4180-comma-2col","sourceDeclarations":{"interface":"decimal-comma-signed"},"runtimeLocale":"es-ES","rawPayload":"sample_id,value\r\nS017,\"-1,234\"","expectedStage":"complete","expectedOutcome":"accept","expectedDecimal":"-1.234","expectedDisposition":"eligible-for-calculation","reachesCalculation":true}
{"caseId":"NL-18","requirementRef":"SRS-IMP-003","riskControlRef":"RC-LOC-03","transport":"csv","dialect":"rfc4180-comma-2col","sourceDeclarations":{"interface":"decimal-comma"},"runtimeLocale":"es-ES","rawPayload":"sample_id,value\r\nS018,\"1\u00a0234,5\"","expectedStage":"full-field-syntax","expectedOutcome":"reject","expectedDecimal":null,"expectedDisposition":"reject-disallowed-nbsp-grouping","reachesCalculation":false}
{"caseId":"NL-19","requirementRef":"SRS-IMP-003","riskControlRef":"RC-LOC-03","transport":"csv","dialect":"rfc4180-comma-2col","sourceDeclarations":{"interface":"decimal-point"},"runtimeLocale":"en-US","rawPayload":"sample_id,value\r\nS019,1.234e2","expectedStage":"full-field-syntax","expectedOutcome":"reject","expectedDecimal":null,"expectedDisposition":"reject-disallowed-exponent-syntax","reachesCalculation":false}
{"caseId":"NL-20","requirementRef":"SRS-IMP-005","riskControlRef":"RC-RNG-01","transport":"csv","dialect":"rfc4180-comma-2col","sourceDeclarations":{"interface":"comma-grouped"},"runtimeLocale":"en-US","rawPayload":"sample_id,value\r\nS020,\"99,999\"","expectedStage":"device-range-check","expectedOutcome":"reject","expectedDecimal":"99999","expectedDisposition":"reject-out-of-range","reachesCalculation":false}
{"caseId":"NL-21","requirementRef":"SRS-IMP-006","riskControlRef":"RC-SYS-01","transport":"csv","dialect":"rfc4180-comma-2col","sourceDeclarations":{},"runtimeLocale":"en-US","rawPayload":"sample_id,value\r\nS021,\"1,234\"","previousCaseId":"NL-01","expectedStage":"source-profile-resolution","expectedOutcome":"hold","expectedDecimal":null,"expectedDisposition":"hold-unresolved-source-format","reachesCalculation":false,"expectedCurrentResult":null}
{"caseId":"NL-22","requirementRef":"SRS-IMP-006","riskControlRef":"RC-SYS-02","transport":"csv","dialect":"rfc4180-comma-2col","sourceDeclarations":{"interface":"decimal-comma"},"runtimeLocale":"en-US","rawPayload":"sample_id,value\r\nS022,\"2,5\"","previousCaseId":"NL-21","expectedStage":"complete","expectedOutcome":"accept","expectedDecimal":"2.5","expectedDisposition":"eligible-for-calculation","reachesCalculation":true,"expectedCurrentResult":{"sampleId":"S022","value":"5"}}

Collect evidence through the calculation boundary

The FDA’s June 2023 final guidance for U.S. premarket submissions gives a documentation framework for device software functions. Sections VI.C and VI.D connect risk controls and software requirements. Typical requirements cover inputs, outputs, interfaces, accepted ranges and error handling. The fixture is one way to turn those topics into testable import requirements. See FDA’s Content of Premarket Submissions for Device Software Functions.

Section VI.H recommends a unit, integration and system testing summary at the Basic documentation level, along with a system test protocol and report and applicable regression evidence. Enhanced documentation adds unit and integration protocols and reports. The protocols include expected and observed results and pass/fail determinations. These are nonbinding recommendations for submissions. The guidance does not prescribe a CSV dialect, a locale parser or the proposed cases here.

Use each layer to answer a different question. The parser can return the exact decimal in a unit test even when the integration layer chooses the wrong profile in production. A correctly rejected field can still leave a downstream display showing yesterday’s value if the system associates results with the wrong import.

  1. Unit verification. Test the full field under the explicitly selected profile. Compare accepted magnitudes with values derived independently of the parser. Check that execution rejects the entire field when a character is invalid. For the nonbreaking-space case NL-18, verify that the input reaching the parser contains U+00A0 and was preserved by the CSV layer.

  2. Integration verification. Check how payload framing, field type and profile selection interact. Exercise the same quoted comma token with working and conflicting profile sources. Compare behavior under different workstation locales. Include a malformed row and verify the failure is recorded before numeric parsing, with no value released downstream.

  3. System verification. Run the three-step result sequence against a representative configuration. Observe whether each input reaches the calculation component and which import identifier a result belongs to. During the hold, check any display or output that can present a current result, including applicable exports. If the interface permits partially accepted batches, verify the specified commit or rollback behavior for affected records and any dependent calculations.

  4. Regression verification. Pin the tested build, parser and locale-data versions, source profile revision, runtime locale and interface dialect. Reassess relevant cases after any of those change, including changes in an upstream exporter. Keep the same independently derived expectations when only the runtime changes. Revise the expected values or dispositions under change control when the interface contract itself changes.

Record the release evidence

Tie the test case to the software requirement and risk control, then record the observation that demonstrates the control worked. For NL-03, the relevant requirement is that an approved source-format declaration governs interpretation even when the workstation locale disagrees. The integration record should identify which declaration was selected, the token received, and the exact parsed magnitude. The system record then checks that the calculation consumed that magnitude. A screenshot of the import-success message alone cannot answer either question.

  • Define the expectations. Map the fixture’s illustrative requirement and risk-control IDs to your own records before execution. Specify the expected disposition, parsed decimal where applicable and whether calculation can run. For a failed import, define how operators can distinguish the current status from any previous result.

  • Preserve the observations. Record the tested build and configuration, the observed parser and system outcomes, and the objective pass/fail determination separately from the fixture. If a case fails, reference the anomaly and the rerun evidence so the review can follow the result through to disposition.

  • Confirm adjacent controls. After import verification, check onward representation and unit conversion where applicable. The unit conversion verification guide covers that later decision. The software verification and validation guide covers the wider traceability process.