MedQraft
← All insights
Regulatory software

Lessons Learned in Translating Regulatory Judgments into Software: A Record of Q-Atelier Engine Design

Real issues encountered when coding regulatory requirements as rules.
This record organizes the design of a system that conducts judgments outside the engine, which addresses reproducibility, rule versioning, and expert calibration.

Last regulatory review: 2026-08-23 Rev. 1.0 6 min read

Judgments Cannot Expand If They Only Reside in Human Minds

The most common question in medical device licensing practice is: "Do I need to obtain approval again for this change?" This arises when raw materials are changed, dimensions adjusted, or software patched.

The answer varies each time, and usually, only one or two individuals within the organization know the answer.

The issue is that those judgments do not remain documented.

When the primary person is absent, the same question may receive a different answer, and when asked in an audit, they have to reconstruct the reasoning for their decision.

As long as the quality of judgment remains tied to individuals, even with organizational growth, the capacity for regulatory compliance will not increase accordingly.

Q-Atelier was created to translate this judgment into software.
Initially a desktop application, it has now migrated to the cloud, allowing various organizations to utilize their own data.

Below is a record of design decisions made during this process and the reasons for those decisions.

Keeping Rules as "Data" Rather Than "Code"

The first principle established was not to implement rules in condition statements.

If regulatory judgments were coded with if statements, every time a rule changed, the code would need to be modified.

Fixing code necessitates deployment, and when deployment is required, the speed of following regulatory amendments is tied to developmental schedules.

Most importantly, it becomes unreadable for humans to know which rule was applied.

Thus, rules were separated out as data.

Risk mapping, impact areas, and judgment bases each exist as separate data structures, and the engine merely "interprets" this data.

When reinforcing rules, one modifies the data while keeping the engine code intact.

Additionally, we attached a ruleset version to it.

The outcome of a judgment retains the version of the ruleset used for that decision.

As regulations change, rules also adapt, but without a version, one cannot explain why past judgments differ from current ones.

With a version, we can say, "This judgment was made based on the rules at that time," and if necessary, we can revert to new rules to compare differences.

The Judgment Engine Must Be a Pure Function

The engine was built as a pure function that does not call on databases or networks.

Input yields output, and the same input will always produce the same output.

There are two reasons for enforcing this constraint:

First, it must be reproducible.

When an audit requires the basis of a judgment, we should be able to demonstrate that "the system gave this answer at the time" instead of just saying, "if the same input is entered now, you get the same answer."

If the engine relies on the DB state at runtime, this principle fails.

Second, it must be testable.

Regulatory judgments carry significant consequences when incorrect, and visual validation deteriorates as rules increase.

Pure functions allow for automatic verification of input-output pairs by stacking them up.

Moreover, the judgment logic itself is divided into stages.

Determine baseline risk, adjust according to combinations, reflect impacts indicated by the development department, produce necessary documents and tests as outcomes, and finally, attach warnings to points requiring attention.

Each stage is separated, allowing us to trace where judgments diverged.

Changes in Rules Must Be Noticeable

Though there are many advantages to keeping rules as data, one risk emerges:

Unintended changes occurring quietly when the data is modified, affecting judgments elsewhere.

In regulatory judgments, this risk is particularly dangerous.

Errors don’t show up on screens, there are no logs left behind, and answers may just change without notice from one day to the next.

Users have no way of realizing this.

Thus, we implemented a Golden Snapshot for the engine's output.

The current outputs for representative inputs are frozen in time; after changing rules, if the same tests yield different outputs, the tests fail.

The moment this safety net was genuinely necessary was when we shifted the judgment logic to a structure that treated rules as data.

While completely altering the internal structure, the output had to remain 100% the same, and with multiple screens and documents utilizing those judgment results, if one were to diverge quietly, it would be challenging to pinpoint.

By freezing the snapshot first and then refactoring, we ensured that we could confirm every time that the "judgment remains unchanged."

The principle is simple:

Only update the snapshot when the rules are changed "intentionally."

Any other changes are classified as incidents.

Judgment Logic Must Not Leave the Server

The ruleset itself serves as an asset.

The moment it goes down to a browser, anyone can inspect it.

Thus, a server-only marker was placed on the judgment module.

If it ever accidentally gets included in a client bundle, the build fails.

Instead of relying on people to adhere to the rules, we made it so that if the rules are violated, the build breaks.

From experience, mere promises to be cautious will inevitably leak over time.

If there are boundaries that must be upheld, it is better to include a device that automatically fails when the rules are broken.

Human Judgment Should Stay "Outside" the Engine

This point was where I pondered the longest while creating the engine.

There will always be cases where experts disagree with the engine's judgment.
This could be due to products that the rules still cannot manage or simply needing to view the same change differently based on context.

When this occurs, directly modifying the engine's rules undoes two critical aspects.

One is reproducibility;

Past judgments can no longer be run again.

The other is traceability;

It becomes impossible to differentiate whether a judgment arose from the rules or from human intervention.

Thus, we placed calibration outside the engine.

Keeping the engine as a pure function, expert-calibrated adjustments are applied in the wrapper layers located before and after the engine.

Calibration does not overturn judgments but adjusts them.

For example, it may raise or lower the risk level by one step under certain conditions.

The core concept is that what has been applied will remain recorded in the results.

When inspecting a judgment outcome, it will display both the engine-generated answer and any calibration that has been added above it.

In the future, when asked "why was this particular judgment reached," we can distinguish if it was due to rules or a human calibration.

Thanks to this structure, the engine remains a pure function while human contributions are recorded.

It took considerable time to find a method that didn't require sacrificing either.

Accumulate in Reversible Units

Schemas are continually evolving.

Regulatory requirements expand, screens increase, and flaws in initial structures emerge.

Thus, database changes were accumulated one at a time, in reversible units.

The backlog of changes to date amounts to hundreds, each with records of "when, what, and why changes were made."

More critical than the scale is the fact that this did not occur all at once.

The structure has been changed several hundred times, and it has consistently been preserved in a reversible manner.

In regulatory systems, this habit is not a choice.

When auditors ask, "Since when has this data been managed this way?" the answer needs to live in the history.

Areas Still Needing Humans

The engine is precise only within the scope of rules.

Judgments that fall outside those rules,namely, products without precedent or edge cases requiring discussion with reviewers, as well as clinical design,are still the domain of human operators.

Thus, Q-Atelier operates on a structure where the engine produces results and experts cross-validate them.

The goal is not to replace humans with the engine but rather to ensure that people don’t have to make judgments from scratch each time.


This article is not a boast but a record.

The challenges we faced while converting regulatory judgments into software will likely be similar for organizations attempting the same.

Should we separate judgments from data? Should we make them reproducible? Should we introduce measures to notice changes? Where to place human intervention?

These decisions must be made before building functionality and are the hardest to reverse later.

If you're reviewing a regulatory system suited for your organization, I've organized how to proceed with Q-Atelier Bespoke.

Frequently asked questions

How does a rules engine differ from generative AI?

A rules engine produces the same result for the same input.
Its reasoning is recorded in rules, so the basis for a decision can be reproduced during an audit.
Generative AI may answer the same question differently, making it difficult to use as the basis for a regulatory determination.

What happens to past decisions when regulations change?

The ruleset version is recorded with each result.
Even after rules change, this shows that the original decision used the rules in effect at that time.
When needed, the same case can be run against the new rules and the differences compared.

What if an expert disagrees with the engine's decision?

A separate adjustment is registered without modifying the engine.
The adjustment is applied outside the engine, and the result records which adjustment was used so it can be audited later.

Let's talk

Apply what you have read
to your product.

Tell us your product's current stage and the questions you need to review.

Discuss your questions ↗
MedQraft / Let's talk

Project inquiry

Start with your challenge.
We will work through it together.

Tell us your product's current stage and the support you need.
We will review the questions and define a suitable scope of support.

Contact@medqraft.co.kr ↗
Information: name, company, email, inquiry and service of interest · Purpose: responding to your inquiry · Retention: until the inquiry is resolved Read the privacy policy
Privacy policy

MedQraft / Privacy

Privacy policy

MedQraft processes only the information needed for website inquiries.
We delete the collected inquiry information when the inquiry is resolved.

Effective date: September 18, 2026

1. Scope and purposes of processing

This policy applies to visits and business inquiries at www.medqraft.co.kr.
We process personal information to review and respond to inquiries, discuss the scope of support, and operate the website reliably.
Customer business data stored in Q-Atelier is governed by the relevant service agreement and separate notices.

2. Information collected and retention

Required information
Name, email address and inquiry
Optional information
Company, selected service of interest, and contact or business details you provide in your inquiry
Collection methods
Website inquiry forms and email inquiries
Basis for processing
Consent to collection and use provided through the inquiry form.
Where necessary to fulfill a request relating to the formation or performance of a contract, we process information on the applicable legal basis.
Retention period
We retain inquiry information until the inquiry is resolved, then delete it without delay.
If information becomes part of a separate contract, we separately explain the required information and retention period.
Where retention is legally required, only the relevant information is stored separately.

You may decline to provide required information, but this will prevent submission of the website inquiry form.
You can make an inquiry without providing optional information.
Do not submit sensitive information unnecessary for the inquiry, such as national identification numbers or patient information.

3. Service providers and external services

Inquiries are forwarded from the website server through an email delivery service to our company mailbox.
We do not maintain a separate inquiry database in this processing workflow.

Vercel Inc.
Website hosting, server-side inquiry processing, operations and security.
Technical information such as IP address, request time, browser and request details may be processed.
Plus Five Five, Inc. (Resend)
Delivery of inquiry notification emails containing name, email, company, service of interest and inquiry details, and management of delivery logs
Gabia Hiworks
Receipt, storage and replies to inquiries in our company mailbox

We do not sell inquiry information or provide it for advertising purposes.
We do not disclose it for an independent third party's purposes unless there is a lawful basis, such as a legal requirement or separate consent.

4. Overseas processing and storage

Overseas cloud services are used to process website requests and deliver emails.
Information entered in an inquiry is transmitted over an encrypted connection upon submission.

Vercel Inc. / United States
Information is transmitted for inquiry request processing and hosting.
Privacy contact: privacy@vercel.com.
Operational records are subject to the retention periods of the services and settings used and Vercel's processing policies.
Vercel data processing information
Plus Five Five, Inc. (Resend) / United States
Information is transmitted upon submission to deliver the inquiry email and manage delivery records.
Privacy contact: privacy@resend.com.
Resend's published default retention period for emails and logs on its standard plans is 30 days.
Earlier deletion may be requested from the provider.
Resend retention and deletion information

Deleting inquiry emails from our mailbox and deleting technical records held by external providers involve different processes.
You may contact the person listed below about deletion, restriction of processing or overseas processing.
If you do not wish to use overseas processing through the website form, you may email us directly.
The processing policies of the email services used will still apply.

5. Deletion and safeguards

After confirming that an inquiry has been resolved, we delete the email and separately saved copies.
Printed materials, if any, are destroyed by shredding or another method that prevents reuse.
Where deletion of information held by an external processor is necessary, we submit a request through that provider's deletion procedure.

Access to personal information is restricted to staff who need it for their work.
We protect information through HTTPS transmission and account access controls.
We do not publish materials containing personal information in public repositories or on public pages.

6. Your rights

You may request access, correction, deletion, restriction of processing or withdrawal of consent by contacting the designated email address.
We will verify your identity to the extent necessary, process the request under applicable law, and notify you of the result.
If we cannot fulfill a request, for example because of a legal retention obligation, we will explain the reason.
For requests made through a representative, we may verify their authority.

7. Access information and external content

We use Naver conversion tracking to measure visits and completed inquiries attributable to Naver search advertising.
Technical information such as the visited URL, referring page, browser and cookies, and whether an inquiry was completed, may be processed.
The name, email, company and inquiry text entered in the form are not included in conversion events.
You can block or delete cookies in your browser.

Server access information may be processed for website delivery and security.
Vercel Web Analytics is used for anonymous visitor statistics on the introduction page and Insights.
Insights statistics aggregate article views, referral sources, countries and device types.
Visitor analytics do not use analytics cookies.
Names, emails, companies and inquiry text from the consultation form are not included in analytics events.
Instagram-specific links use UTM parameters to identify referral sources.
Loading external video or fonts on the website may transmit technical information, including IP address and browser details, to the relevant provider.

You can block or delete cookies and site data in your browser settings.
Some features or external content may be restricted depending on your settings.

8. Privacy officer and contact

Business
MedQraft / Representative: Byeonghwi Kim
Privacy officer and inquiry contact
Byeonghwi Kim
Email
Contact@medqraft.co.kr
Postal inquiries
Suite 222, 56 Geumto-ro 80beon-gil, Sujeong-gu, Seongnam-si, Gyeonggi-do, Republic of Korea (Geumto-dong, Widen Tower)

For privacy-related complaints, you may contact the Personal Information Infringement Report Center or the Personal Information Dispute Mediation Committee for assistance.

9. Changes to this policy

Changes to processing purposes, information collected, retention periods or service providers will be published on this page with their effective date.

September 18, 2026: Website inquiry privacy policy first published

October 14, 2026: Added information on Insights visitor analytics and Instagram referral measurement