aw-spec-cli 0.1.7 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/.appweaver/DESIGN-FORMAT.md +200 -0
- package/assets/.appweaver/ORCH-DIALECT.md +156 -0
- package/assets/.appweaver/RULE-PARTITION.md +175 -0
- package/assets/.appweaver/STACK-PROFILES.md +461 -0
- package/assets/.appweaver/ai-rules.md +180 -0
- package/assets/.appweaver/domain.json +1 -0
- package/assets/.appweaver/extensions/.registry +19 -0
- package/assets/.appweaver/extensions/agent-context/README.md +57 -0
- package/assets/.appweaver/extensions/agent-context/agent-context-config.yml +4 -0
- package/assets/.appweaver/extensions/agent-context/commands/aw-spec.agent-context.update.md +26 -0
- package/assets/.appweaver/extensions/agent-context/extension.yml +37 -0
- package/assets/.appweaver/extensions/agent-context/scripts/bash/update-agent-context.sh +201 -0
- package/assets/.appweaver/extensions/agent-context/scripts/powershell/update-agent-context.ps1 +237 -0
- package/assets/.appweaver/extensions.yml +16 -0
- package/assets/.appweaver/feature.json +3 -0
- package/assets/.appweaver/init-options.json +9 -0
- package/assets/.appweaver/integration.json +15 -0
- package/assets/.appweaver/integrations/aw-spec.manifest.json +9 -0
- package/assets/.appweaver/interpreter/run-skill.py +1176 -0
- package/assets/.appweaver/memory/constitution.md +50 -0
- package/assets/.appweaver/orchestrator/.smoke-out/smoke.md +6 -0
- package/assets/.appweaver/orchestrator/AGENT-PROFILE.md +94 -0
- package/assets/.appweaver/orchestrator/README.md +300 -0
- package/assets/.appweaver/orchestrator/adapters/claude_agent_sdk.py +74 -0
- package/assets/.appweaver/orchestrator/adapters/google_antigravity.py +74 -0
- package/assets/.appweaver/orchestrator/modules/delta-design.orch.yaml +105 -0
- package/assets/.appweaver/orchestrator/modules/delta-spec.orch.yaml +101 -0
- package/assets/.appweaver/orchestrator/modules/domain-select.orch.yaml +90 -0
- package/assets/.appweaver/orchestrator/modules/lane-gate.orch.yaml +126 -0
- package/assets/.appweaver/orchestrator/modules/tech-select.orch.yaml +123 -0
- package/assets/.appweaver/orchestrator/orchestrator.py +1721 -0
- package/assets/.appweaver/orchestrator/rev-templates/ai-rules.reference.md +40 -0
- package/assets/.appweaver/orchestrator/rev-templates/delta-design-template.skeleton.md +101 -0
- package/assets/.appweaver/orchestrator/rev-templates/design-template.skeleton.md +245 -0
- package/assets/.appweaver/orchestrator/rev-templates/domain-constitution.skeleton.md +63 -0
- package/assets/.appweaver/orchestrator/rev-templates/domain-requirements.skeleton.md +48 -0
- package/assets/.appweaver/orchestrator/rev-templates/domain-rule-bindings.skeleton.md +59 -0
- package/assets/.appweaver/orchestrator/rev-templates/domain-rule-file.skeleton.md +39 -0
- package/assets/.appweaver/orchestrator/rev-templates/frontend-rule-file.skeleton.md +63 -0
- package/assets/.appweaver/orchestrator/rev-templates/tech-rule-bindings.skeleton.md +116 -0
- package/assets/.appweaver/orchestrator/rev-templates/technical-constitution.skeleton.md +106 -0
- package/assets/.appweaver/orchestrator/rev-templates/technical-rule-file.skeleton.md +54 -0
- package/assets/.appweaver/orchestrator/rev-templates/ui-constitution.skeleton.md +125 -0
- package/assets/.appweaver/orchestrator/rev-templates/ui-delta-design-template.skeleton.md +123 -0
- package/assets/.appweaver/orchestrator/rev-templates/ui-design-template.skeleton.md +294 -0
- package/assets/.appweaver/orchestrator/workflows/_smoke.orch.yaml +160 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-add-component.orch.yaml +270 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-adopt.orch.yaml +934 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-analyze-delta-design.orch.yaml +251 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-analyze-design.orch.yaml +265 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-analyze-slice.orch.yaml +437 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-build.orch.yaml +197 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-characterize.orch.yaml +475 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-close-delta.orch.yaml +181 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-constitution.orch.yaml +727 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-demo.orch.yaml +100 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-dependency-tree.orch.yaml +69 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-deploy.orch.yaml +85 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-design-ui.orch.yaml +386 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-design.orch.yaml +382 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-finalize-delta.orch.yaml +462 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-foundation.orch.yaml +265 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-implement-delta.orch.yaml +253 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-implement-ui.orch.yaml +267 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-implement.orch.yaml +287 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-inventory.orch.yaml +238 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-onboard.orch.yaml +1822 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-parity.orch.yaml +293 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-run.orch.yaml +194 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-select-domain.orch.yaml +83 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-select-feature.orch.yaml +128 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-select-stack.orch.yaml +296 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-specify.orch.yaml +439 -0
- package/assets/.appweaver/scripts/bash/aw-inventory.sh +17 -0
- package/assets/.appweaver/scripts/bash/aw-parity.sh +13 -0
- package/assets/.appweaver/scripts/bash/aw-rev-constitution.sh +13 -0
- package/assets/.appweaver/scripts/bash/aw-spec-actions.sh +2626 -0
- package/assets/.appweaver/scripts/bash/aw-xref.sh +15 -0
- package/assets/.appweaver/scripts/bash/common.sh +533 -0
- package/assets/.appweaver/scripts/powershell/aw-inventory.ps1 +17 -0
- package/assets/.appweaver/scripts/powershell/aw-parity.ps1 +13 -0
- package/assets/.appweaver/scripts/powershell/aw-rev-constitution.ps1 +13 -0
- package/assets/.appweaver/scripts/powershell/aw-spec-actions.ps1 +2232 -0
- package/assets/.appweaver/scripts/powershell/aw-xref.ps1 +15 -0
- package/assets/.appweaver/scripts/python/aw-component-catalog.py +121 -0
- package/assets/.appweaver/scripts/python/aw-inventory.py +1180 -0
- package/assets/.appweaver/scripts/python/aw-parity.py +380 -0
- package/assets/.appweaver/scripts/python/aw-rev-constitution.py +329 -0
- package/assets/.appweaver/scripts/python/aw-stack.py +1251 -0
- package/assets/.appweaver/scripts/python/aw-xref.py +1330 -0
- package/assets/.appweaver/scripts/python/validate_okf.py +352 -0
- package/assets/.appweaver/stack-profiles/angular.json +16 -0
- package/assets/.appweaver/stack-profiles/blazor-wasm.json +17 -0
- package/assets/.appweaver/stack-profiles/dotnet-webapi.json +15 -0
- package/assets/.appweaver/stack-profiles/go-chi.json +14 -0
- package/assets/.appweaver/stack-profiles/java-spring.json +16 -0
- package/assets/.appweaver/stack-profiles/nextjs.json +16 -0
- package/assets/.appweaver/stack-profiles/node-express.json +15 -0
- package/assets/.appweaver/stack-profiles/python-fastapi.json +16 -0
- package/assets/.appweaver/stack-profiles/react-vite.json +17 -0
- package/assets/.appweaver/stack-profiles/sveltekit.json +16 -0
- package/assets/.appweaver/stack-profiles/vue-vite.json +17 -0
- package/assets/.appweaver/stacks.json +3 -0
- package/assets/.appweaver/templates/constitution-domain-template.md +116 -0
- package/assets/.appweaver/templates/constitution-technical-template.md +108 -0
- package/assets/.appweaver/templates/constitution-ui-template.md +116 -0
- package/assets/.appweaver/templates/delta-design-template.md +69 -0
- package/assets/.appweaver/templates/delta-spec-template.md +63 -0
- package/assets/.appweaver/templates/design-template.md +383 -0
- package/assets/.appweaver/templates/okf-concept-template.md +114 -0
- package/assets/.appweaver/templates/parity-manifest-template.json +49 -0
- package/assets/.appweaver/templates/source-map-template.md +85 -0
- package/assets/.appweaver/templates/spec-template.md +309 -0
- package/assets/.appweaver/templates/ui-design-template.md +273 -0
- package/assets/foundations/dotnet/ModularMonolith/ModularMonolith.Reference.pack.txt +25248 -0
- package/assets/foundations/dotnet/ModularMonolith/ModularMonolith.pack.txt +5726 -0
- package/assets/foundations/dotnet/ModularMonolith/pack-foundation.ps1 +145 -0
- package/assets/foundations/dotnet/ModularMonolith/pack-foundation.sh +196 -0
- package/assets/foundations/dotnet/ModularMonolith/pack-reference-foundation.ps1 +157 -0
- package/assets/foundations/dotnet/ModularMonolith/pack-reference-foundation.sh +209 -0
- package/assets/foundations/dotnet/ModularMonolith/unpack-foundation.ps1 +126 -0
- package/assets/foundations/dotnet/ModularMonolith/unpack-foundation.sh +217 -0
- package/assets/foundations/dotnet/ModularMonolith/unpack-reference-foundation.ps1 +129 -0
- package/assets/foundations/dotnet/ModularMonolith/unpack-reference-foundation.sh +218 -0
- package/assets/foundations/dotnet/VerticalSlice/VerticalSlice.Reference.pack.txt +19318 -0
- package/assets/foundations/dotnet/VerticalSlice/VerticalSlice.pack.txt +2833 -0
- package/assets/foundations/dotnet/VerticalSlice/pack-foundation.ps1 +145 -0
- package/assets/foundations/dotnet/VerticalSlice/pack-foundation.sh +196 -0
- package/assets/foundations/dotnet/VerticalSlice/pack-reference-foundation.ps1 +157 -0
- package/assets/foundations/dotnet/VerticalSlice/pack-reference-foundation.sh +209 -0
- package/assets/foundations/dotnet/VerticalSlice/unpack-foundation.ps1 +126 -0
- package/assets/foundations/dotnet/VerticalSlice/unpack-foundation.sh +217 -0
- package/assets/foundations/dotnet/VerticalSlice/unpack-reference-foundation.ps1 +129 -0
- package/assets/foundations/dotnet/VerticalSlice/unpack-reference-foundation.sh +218 -0
- package/assets/foundations/dotnet/components/Email/README.md +119 -0
- package/assets/foundations/dotnet/components/Email/ReferenceEndpoints/SendEmailEndpoint.cs +84 -0
- package/assets/foundations/dotnet/components/Email/integration.md +300 -0
- package/assets/foundations/dotnet/components/Jobs/README.md +113 -0
- package/assets/foundations/dotnet/components/Jobs/integration.md +259 -0
- package/assets/foundations/dotnet/components/QrGenerator/README.md +85 -0
- package/assets/foundations/dotnet/components/QrGenerator/ReferenceEndpoints/GenerateQrEndpoint.cs +57 -0
- package/assets/foundations/dotnet/components/QrGenerator/integration.md +230 -0
- package/assets/foundations/dotnet/components/README.md +74 -0
- package/assets/guardrails/README.md +222 -0
- package/assets/guardrails/domain/healthcare/ai-rules.domain.md +34 -0
- package/assets/guardrails/domain/healthcare/api-versioning.domain.md +17 -0
- package/assets/guardrails/domain/healthcare/auditing.domain.md +97 -0
- package/assets/guardrails/domain/healthcare/authorization.domain.md +26 -0
- package/assets/guardrails/domain/healthcare/clinical-terms.md +20 -0
- package/assets/guardrails/domain/healthcare/coding-standards.domain.md +26 -0
- package/assets/guardrails/domain/healthcare/consent.md +19 -0
- package/assets/guardrails/domain/healthcare/cqrs.domain.md +12 -0
- package/assets/guardrails/domain/healthcare/data-classification.domain.md +28 -0
- package/assets/guardrails/domain/healthcare/dependency-policy.domain.md +11 -0
- package/assets/guardrails/domain/healthcare/dicom.md +15 -0
- package/assets/guardrails/domain/healthcare/domain-constitution.md +119 -0
- package/assets/guardrails/domain/healthcare/domain-driven-design.domain.md +28 -0
- package/assets/guardrails/domain/healthcare/eventing.domain.md +18 -0
- package/assets/guardrails/domain/healthcare/fhir.md +36 -0
- package/assets/guardrails/domain/healthcare/folder-structure.domain.md +25 -0
- package/assets/guardrails/domain/healthcare/hipaa.md +34 -0
- package/assets/guardrails/domain/healthcare/hl7.md +15 -0
- package/assets/guardrails/domain/healthcare/ihe-conformance.md +31 -0
- package/assets/guardrails/domain/healthcare/integration-terms.md +21 -0
- package/assets/guardrails/domain/healthcare/persistence.domain.md +20 -0
- package/assets/guardrails/domain/healthcare/terminology.md +30 -0
- package/assets/guardrails/domain/healthcare/testing.domain.md +15 -0
- package/assets/guardrails/domain/healthcare/ux/accessibility-standards.md +36 -0
- package/assets/guardrails/domain/healthcare/ux/content-design.md +32 -0
- package/assets/guardrails/domain/healthcare/ux/interaction-states.md +44 -0
- package/assets/guardrails/domain/healthcare/ux/journey-mapping.md +40 -0
- package/assets/guardrails/domain/healthcare/vertical-slices.domain.md +18 -0
- package/assets/guardrails/domain/healthcare/zero-trust.domain.md +12 -0
- package/assets/guardrails/domain/pharma/ai-rules.domain.md +32 -0
- package/assets/guardrails/domain/pharma/api-versioning.domain.md +20 -0
- package/assets/guardrails/domain/pharma/atc.md +22 -0
- package/assets/guardrails/domain/pharma/auditing.domain.md +90 -0
- package/assets/guardrails/domain/pharma/authorization.domain.md +25 -0
- package/assets/guardrails/domain/pharma/coding-standards.domain.md +28 -0
- package/assets/guardrails/domain/pharma/cqrs.domain.md +16 -0
- package/assets/guardrails/domain/pharma/data-classification.domain.md +24 -0
- package/assets/guardrails/domain/pharma/data-provenance.md +21 -0
- package/assets/guardrails/domain/pharma/dependency-policy.domain.md +11 -0
- package/assets/guardrails/domain/pharma/domain-constitution.md +113 -0
- package/assets/guardrails/domain/pharma/domain-driven-design.domain.md +36 -0
- package/assets/guardrails/domain/pharma/domain-requirements.sample.md +103 -0
- package/assets/guardrails/domain/pharma/eventing.domain.md +18 -0
- package/assets/guardrails/domain/pharma/fhir.md +31 -0
- package/assets/guardrails/domain/pharma/folder-structure.domain.md +26 -0
- package/assets/guardrails/domain/pharma/hl7.md +17 -0
- package/assets/guardrails/domain/pharma/idmp.md +26 -0
- package/assets/guardrails/domain/pharma/integration-terms.md +21 -0
- package/assets/guardrails/domain/pharma/ndc.md +28 -0
- package/assets/guardrails/domain/pharma/persistence.domain.md +23 -0
- package/assets/guardrails/domain/pharma/pharma-terms.md +27 -0
- package/assets/guardrails/domain/pharma/product-lifecycle.domain.md +30 -0
- package/assets/guardrails/domain/pharma/regulatory-compliance.md +19 -0
- package/assets/guardrails/domain/pharma/terminology.md +32 -0
- package/assets/guardrails/domain/pharma/testing.domain.md +19 -0
- package/assets/guardrails/domain/pharma/vertical-slices.domain.md +17 -0
- package/assets/guardrails/domain/pharma/zero-trust.domain.md +12 -0
- package/assets/guardrails/projects/dotnet-default-project/domain/domain-requirements.md +58 -0
- package/assets/guardrails/projects/dotnet-default-project/domain-rule-bindings.md +113 -0
- package/assets/guardrails/projects/dotnet-default-project/frontend/ui-requirements.md +43 -0
- package/assets/guardrails/projects/dotnet-default-project/service/technical-requirements.md +40 -0
- package/assets/guardrails/projects/dotnet-default-project/tech-rule-bindings.md +263 -0
- package/assets/guardrails/requirement-spec.txt +27 -0
- package/assets/guardrails/technology/dotnet-webapi/PACKAGING.md +184 -0
- package/assets/guardrails/technology/dotnet-webapi/api-versioning.md +44 -0
- package/assets/guardrails/technology/dotnet-webapi/auditing.md +96 -0
- package/assets/guardrails/technology/dotnet-webapi/authorization-matrix.md +14 -0
- package/assets/guardrails/technology/dotnet-webapi/authorization.md +39 -0
- package/assets/guardrails/technology/dotnet-webapi/clean-architecture.md +54 -0
- package/assets/guardrails/technology/dotnet-webapi/coding-standards.md +87 -0
- package/assets/guardrails/technology/dotnet-webapi/cqrs.md +63 -0
- package/assets/guardrails/technology/dotnet-webapi/data-classification.md +38 -0
- package/assets/guardrails/technology/dotnet-webapi/dependency-policy.md +40 -0
- package/assets/guardrails/technology/dotnet-webapi/domain-driven-design.md +91 -0
- package/assets/guardrails/technology/dotnet-webapi/eventing.md +57 -0
- package/assets/guardrails/technology/dotnet-webapi/examples/api-versioning.md +75 -0
- package/assets/guardrails/technology/dotnet-webapi/examples/auditing.md +84 -0
- package/assets/guardrails/technology/dotnet-webapi/examples/authorization.md +68 -0
- package/assets/guardrails/technology/dotnet-webapi/examples/clean-architecture.md +37 -0
- package/assets/guardrails/technology/dotnet-webapi/examples/cqrs.md +97 -0
- package/assets/guardrails/technology/dotnet-webapi/examples/domain-driven-design.md +141 -0
- package/assets/guardrails/technology/dotnet-webapi/examples/eventing.md +46 -0
- package/assets/guardrails/technology/dotnet-webapi/examples/persistence.md +207 -0
- package/assets/guardrails/technology/dotnet-webapi/examples/vertical-slices.md +151 -0
- package/assets/guardrails/technology/dotnet-webapi/examples/zero-trust.md +48 -0
- package/assets/guardrails/technology/dotnet-webapi/folder-structure.md +61 -0
- package/assets/guardrails/technology/dotnet-webapi/modular-monolith.md +47 -0
- package/assets/guardrails/technology/dotnet-webapi/persistence.md +82 -0
- package/assets/guardrails/technology/dotnet-webapi/technology-constitution.md +162 -0
- package/assets/guardrails/technology/dotnet-webapi/testing.md +55 -0
- package/assets/guardrails/technology/dotnet-webapi/vertical-slices.md +70 -0
- package/assets/guardrails/technology/dotnet-webapi/zero-trust.md +48 -0
- package/assets/guardrails/technology/java-spring/README.md +62 -0
- package/assets/guardrails/technology/nextjs/accessibility-implementation.md +56 -0
- package/assets/guardrails/technology/nextjs/api-client.md +56 -0
- package/assets/guardrails/technology/nextjs/api-integration.dotnet-webapi.md +174 -0
- package/assets/guardrails/technology/nextjs/api-integration.java-spring.md +203 -0
- package/assets/guardrails/technology/nextjs/auth-session.md +68 -0
- package/assets/guardrails/technology/nextjs/client-security.md +69 -0
- package/assets/guardrails/technology/nextjs/component-architecture.md +60 -0
- package/assets/guardrails/technology/nextjs/component-conventions.md +58 -0
- package/assets/guardrails/technology/nextjs/design-system.md +60 -0
- package/assets/guardrails/technology/nextjs/error-handling.md +72 -0
- package/assets/guardrails/technology/nextjs/forms-and-validation.md +75 -0
- package/assets/guardrails/technology/nextjs/frontend-testing.md +94 -0
- package/assets/guardrails/technology/nextjs/i18n.md +57 -0
- package/assets/guardrails/technology/nextjs/observability.md +67 -0
- package/assets/guardrails/technology/nextjs/performance-budgets.md +66 -0
- package/assets/guardrails/technology/nextjs/routing-navigation.md +52 -0
- package/assets/guardrails/technology/nextjs/state-management.md +70 -0
- package/assets/guardrails/technology/nextjs/ui-constitution.md +166 -0
- package/dist/commands/init.js +2 -2
- package/dist/commands/init.js.map +1 -1
- package/dist/utils/copy-assets.js +8 -8
- package/dist/utils/copy-assets.js.map +1 -1
- package/package.json +1 -1
- package/assets/docs/pharma-constitution.my-ref.md +0 -86
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
# Domain Constitution — healthcare
|
|
2
|
+
|
|
3
|
+
> The industry-specific governance base for this industry corpus. It heads the set mapped under
|
|
4
|
+
> `## /aw-spec-constitution` in a project's `domain-rule-bindings.md` — this file, then the standard
|
|
5
|
+
> industry rules beside it, then the project team's `domain-requirements.md` — which
|
|
6
|
+
> `/appweaver constitution` ratifies into `.appweaver/memory/constitution.domain.md`.
|
|
7
|
+
>
|
|
8
|
+
> `domain-requirements.md` is supplied by the project owner and its mapping is optional: where
|
|
9
|
+
> the file is absent the set loads without it, and the ratified half carries the standard
|
|
10
|
+
> industry rules alone.
|
|
11
|
+
|
|
12
|
+
This file carries **only** what is true because the industry is healthcare: project identity,
|
|
13
|
+
the regulatory regime, and the domain principles that extend the technology base. Generic rules
|
|
14
|
+
stay in the corpus's detail rule files — this file says which of them are supreme and
|
|
15
|
+
non-negotiable, and cites them. Keep every principle to one declarative, testable line plus its
|
|
16
|
+
`→` pointer; do not restate the rule file here.
|
|
17
|
+
|
|
18
|
+
Principles are numbered **XVI+**, continuing the technology base which ends at XV. Each names
|
|
19
|
+
the technical principle it extends. Experience principles (UX-*) belong to the lane corpus's
|
|
20
|
+
`ui-constitution.md` and never appear here.
|
|
21
|
+
|
|
22
|
+
## Project Identity
|
|
23
|
+
|
|
24
|
+
- **Regulated role**: a system handling protected health information on behalf of covered
|
|
25
|
+
entities — clinical records, the consent that governs them, and the interoperability surfaces
|
|
26
|
+
other care systems read.
|
|
27
|
+
- **Bounded contexts**: patient & identity · clinical record · consent & authorization ·
|
|
28
|
+
imaging · interoperability.
|
|
29
|
+
- **Consumers**: care providers, patients exercising access rights, and partner clinical
|
|
30
|
+
systems, all through the published API and projections — never the database.
|
|
31
|
+
|
|
32
|
+
## Regulatory Regime
|
|
33
|
+
|
|
34
|
+
- **HIPAA** — Privacy, Security and Breach Notification Rules; the minimum-necessary standard
|
|
35
|
+
applies to every access path, not only to exports.
|
|
36
|
+
- **HITECH** — breach notification and the accounting of disclosures.
|
|
37
|
+
- **Interoperability** — HL7 FHIR as the published surface; HL7 v2 and DICOM at the boundaries
|
|
38
|
+
where the estate still speaks them.
|
|
39
|
+
- Retention is jurisdiction-set and outranks any deletion request the platform can otherwise
|
|
40
|
+
honour; a right-to-erasure request against a retained clinical record is a documented refusal.
|
|
41
|
+
|
|
42
|
+
## Domain Principles (XVI+)
|
|
43
|
+
|
|
44
|
+
### XVI — PHI is Classified Before it is Stored (NON-NEGOTIABLE)
|
|
45
|
+
*Extends IX (Security by Default).* Every field carrying protected health information is
|
|
46
|
+
classified at design time; classification drives encryption, masking, export eligibility and log
|
|
47
|
+
redaction — no field is classified after the fact, and unclassified PHI is a blocking defect.
|
|
48
|
+
→ `guardrails/domain/healthcare/data-classification.domain.md`
|
|
49
|
+
|
|
50
|
+
### XVII — Minimum Necessary is Enforced, Not Documented (NON-NEGOTIABLE)
|
|
51
|
+
*Extends IX (Security by Default).* Access is scoped to the care relationship and the purpose of
|
|
52
|
+
use; a query that can return more than the requester's role and purpose permit is a defect in
|
|
53
|
+
the query, not a matter for review afterwards.
|
|
54
|
+
→ `guardrails/domain/healthcare/authorization.domain.md`, `hipaa.md`
|
|
55
|
+
|
|
56
|
+
### XVIII — Consent is a Precondition, Not a Filter (NON-NEGOTIABLE)
|
|
57
|
+
*Extends IX (Security by Default).* Consent state is evaluated before a disclosure is assembled;
|
|
58
|
+
no code path builds a response and then removes what consent forbids.
|
|
59
|
+
→ `guardrails/domain/healthcare/consent.md`
|
|
60
|
+
|
|
61
|
+
### XIX — Every PHI Touch is Auditable (NON-NEGOTIABLE)
|
|
62
|
+
*Extends X (Observability).* Reads as well as mutations of PHI emit an audit record carrying
|
|
63
|
+
actor, subject, purpose and outcome; the audit trail is append-only and survives the record it
|
|
64
|
+
describes.
|
|
65
|
+
→ `guardrails/domain/healthcare/auditing.domain.md`, `hipaa.md`
|
|
66
|
+
|
|
67
|
+
### XX — Break-Glass is Time-Boxed and Loud
|
|
68
|
+
*Extends IX (Security by Default).* Emergency access is a modelled, expiring grant that
|
|
69
|
+
announces itself in the audit trail and triggers review — never an unlogged bypass and never a
|
|
70
|
+
standing role.
|
|
71
|
+
→ `guardrails/domain/healthcare/zero-trust.domain.md`, `authorization.domain.md`
|
|
72
|
+
|
|
73
|
+
### XXI — Clinical Interoperability is FHIR-First
|
|
74
|
+
*Extends XIV (Single Source of Truth).* FHIR resources are the published contract, generated
|
|
75
|
+
from the domain model and versioned; HL7 v2 feeds are adapted at the boundary and never allowed
|
|
76
|
+
to shape an aggregate.
|
|
77
|
+
→ `guardrails/domain/healthcare/fhir.md`, `hl7.md`
|
|
78
|
+
|
|
79
|
+
### XXII — Imaging Objects Stay DICOM-Governed
|
|
80
|
+
*Extends XIV (Single Source of Truth).* Imaging metadata is read from and written back to DICOM
|
|
81
|
+
as the authority; de-identification is an explicit, audited transformation, never a side effect
|
|
82
|
+
of a projection.
|
|
83
|
+
→ `guardrails/domain/healthcare/dicom.md`
|
|
84
|
+
|
|
85
|
+
### XXIII — Clinical Meaning is Bound, Never Free Text (NON-NEGOTIABLE)
|
|
86
|
+
*Extends III (Domain-Driven Design).* Coded clinical concepts bind to the governed value set as
|
|
87
|
+
validated value objects; an unbound or unrecognised code is a rejected write, and a free-text
|
|
88
|
+
field never stands in for a coded one.
|
|
89
|
+
→ `guardrails/domain/healthcare/clinical-terms.md`, `terminology.md`
|
|
90
|
+
|
|
91
|
+
### XXIV — Generation Refuses Where the Domain Requires a Human
|
|
92
|
+
*Extends the AI operational rules.* An agent may not invent a clinical code, a consent
|
|
93
|
+
semantic, a retention period or a de-identification rule; where the rule files are silent the
|
|
94
|
+
generation stops and asks. Generated artifacts never contain real PHI.
|
|
95
|
+
→ `guardrails/domain/healthcare/ai-rules.domain.md`
|
|
96
|
+
|
|
97
|
+
## Domain Folder Additions
|
|
98
|
+
|
|
99
|
+
Additions to the technology base's mandatory structure — Interop adapters per published surface,
|
|
100
|
+
consent and audit control fixtures, and de-identified domain test data — are governed by
|
|
101
|
+
`guardrails/domain/healthcare/folder-structure.domain.md`. Nothing here relaxes the base layout.
|
|
102
|
+
|
|
103
|
+
## Governance Overrides
|
|
104
|
+
|
|
105
|
+
- An amendment touching a NON-NEGOTIABLE principle above requires the Principal Engineer **and**
|
|
106
|
+
the Privacy Officer named for the project.
|
|
107
|
+
- A change to a published interoperability surface, a consent semantic, a retention period or a
|
|
108
|
+
de-identification rule triggers privacy review before merge.
|
|
109
|
+
- This half versions independently of `technology-constitution.md` and
|
|
110
|
+
`ui-constitution.md`; the base amendment procedure and SemVer policy apply unchanged.
|
|
111
|
+
|
|
112
|
+
## Ratification Metadata
|
|
113
|
+
|
|
114
|
+
> Carried into `constitution.domain.md` at ratification; the constitution command owns the
|
|
115
|
+
> version bump from there.
|
|
116
|
+
|
|
117
|
+
- **Version:** 1.0.0
|
|
118
|
+
- **Ratified:** `<YYYY-MM-DD>`
|
|
119
|
+
- **Last Amended:** `<YYYY-MM-DD>`
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Domain-Driven Design — Healthcare Domain Model
|
|
2
|
+
|
|
3
|
+
> Technology base: [[domain-driven-design]]. NON-NEGOTIABLE. Commands: `/aw-spec-specify`.
|
|
4
|
+
|
|
5
|
+
## Modeling
|
|
6
|
+
- Use the clinical/interop ubiquitous language (see [[clinical-terms]], [[integration-terms]]).
|
|
7
|
+
- FHIR-aligned, but **FHIR resources are projections, not the system of record** (see [[fhir]]).
|
|
8
|
+
- Coded concepts use industry terminologies, never free text (see [[terminology]]); coded value objects follow the FHIR pattern (`Codeable`, `Coding`, `Quantity`, `Period`, `Range`, `Ratio`, `Identifier`, `HumanName`, `Address`, `ContactPoint`).
|
|
9
|
+
- Domain may throw `ConsentDeniedException` beyond generic Domain exceptions (see [[consent]]).
|
|
10
|
+
|
|
11
|
+
## Aggregates & invariants
|
|
12
|
+
- **Patient** — MRN unique per tenant; DOB <= today; merge only via `MergePatientsCommand` preserving audit; minimum-necessary projection by role/scope.
|
|
13
|
+
- **Consent** — withdrawal blocks downstream PHI disclosure for the purpose-of-use immediately; emits `ConsentChangedEvent` (see [[consent]]).
|
|
14
|
+
- **Appointment** — no overlap with a booked slot for the same Practitioner/Resource; no past booking; late cancellation (< N hrs) emits `LateCancellationEvent`.
|
|
15
|
+
- **Encounter** — not Closed/Discharged while any open Order/Result/ChargeItem/unsigned ClinicalNote exists; admission requires active Coverage or documented self-pay.
|
|
16
|
+
- **ClinicalNote** — Signed = immutable; addendum is a new linked note; deletion forbidden (supersede via Amend).
|
|
17
|
+
- **MedicationRequest** — dispense forbidden on active allergy match, lethal interaction, or pediatric/renal contraindication without a documented override (prescriber, reason, timestamp).
|
|
18
|
+
- **ControlledSubstanceLedger** — every dispense/waste must balance; append-only; daily reconciliation.
|
|
19
|
+
- **LabOrder/ImagingOrder** — not Cancellable once a Specimen/Image is acquired; transition to Aborted with a reason.
|
|
20
|
+
- **Claim** — total billed = sum(ChargeItem.amount); resubmission needs a new ClaimVersion; none after final adjudication unless an Appeal is opened.
|
|
21
|
+
- **InventoryItem** — stock <= 0 forbidden; dispensing an expired Lot rejected; near-expiry emits `ExpiryAlertEvent`.
|
|
22
|
+
- **AuditRecord** — append-only; no update/delete; retention >= 6 years (see [[auditing.domain]]).
|
|
23
|
+
|
|
24
|
+
## AI guidance
|
|
25
|
+
See [[ai-rules.domain]] — confirm signatures, use the official FHIR SDK, never invent codes, mask PHI.
|
|
26
|
+
|
|
27
|
+
## Related
|
|
28
|
+
- [[domain-driven-design]] · [[fhir]] · [[terminology]] · [[consent]] · [[clinical-terms]] · [[integration-terms]] · [[auditing.domain]] · [[persistence.domain]] · [[ai-rules.domain]]
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Eventing — Healthcare Domain Addenda
|
|
2
|
+
|
|
3
|
+
> Technology base: [[eventing]]. Commands: `/aw-spec-specify`, `/aw-spec-gate`.
|
|
4
|
+
|
|
5
|
+
## Inbound feeds
|
|
6
|
+
Each translated to internal commands via Interop adapters — never writing aggregates directly (see [[eventing]]):
|
|
7
|
+
- HL7 v2 (ADT/ORM/ORU/SIU/MDM/DFT) — see [[hl7]]
|
|
8
|
+
- External EHR FHIR pulls — see [[fhir]]
|
|
9
|
+
- Lab / radiology result feeds; claim adjudication responses
|
|
10
|
+
|
|
11
|
+
## Trace propagation
|
|
12
|
+
- Trace context MUST propagate across **HL7v2 / DICOM / FHIR** outbound calls (beyond generic mediator/`HttpClient`/EF Core propagation).
|
|
13
|
+
|
|
14
|
+
## Single source of truth
|
|
15
|
+
- Authoritative system of record; consumers use FHIR / REST / CloudEvents / Bulk `$export` — **direct DB access FORBIDDEN** (see [[hipaa]]).
|
|
16
|
+
|
|
17
|
+
## Related
|
|
18
|
+
- [[eventing]] · [[hl7]] · [[fhir]] · [[dicom]] · [[hipaa]]
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# FHIR Standards
|
|
2
|
+
|
|
3
|
+
> NON-NEGOTIABLE. Commands: `/aw-spec-constitution`, `/aw-spec-specify`.
|
|
4
|
+
|
|
5
|
+
## Architecture
|
|
6
|
+
- **R4 is the default external contract**; R5 is **additive** under `/fhir/R5/...`.
|
|
7
|
+
- FHIR is the canonical interop contract; internal REST is for first-party apps. Both serve from the **same authoritative aggregates** — no duplicate write paths.
|
|
8
|
+
|
|
9
|
+
## Projector rules (system of record)
|
|
10
|
+
- **FHIR resources are PROJECTIONS over the aggregates — NOT the system of record.**
|
|
11
|
+
- Mapping lives in `{Module}/Interop/Fhir/<Resource>Projector.cs`, hand-written + round-trip tested (`domain -> FHIR -> domain`; see [[testing]]).
|
|
12
|
+
- A second FHIR write path bypassing the aggregate is FORBIDDEN; FHIR representations **MUST NOT** replace internal DTOs (see [[vertical-slices]]).
|
|
13
|
+
|
|
14
|
+
## Resources & terminology
|
|
15
|
+
- FHIR types come from the **official FHIR .NET SDK**, version-matched (R4/R5) to the endpoint.
|
|
16
|
+
- Coded fields map from `Codeable`/`Coding` VOs to FHIR `CodeableConcept`/`Coding` (see [[terminology]]).
|
|
17
|
+
|
|
18
|
+
## Profiles & CapabilityStatement
|
|
19
|
+
- Honor **US Core** + project IGs; declare profiles/extensions/value-sets/search-params in `StructureDefinition` resources packaged with the service.
|
|
20
|
+
- Publish `CapabilityStatement` at `/fhir/metadata` (regenerates cleanly in CI; diff reviewed); `/metadata` + `/.well-known` may be `AllowAnonymous()`.
|
|
21
|
+
- Breaking changes require a **new version path** + published CapabilityStatement diff (see [[api-versioning.domain]]); FHIR validator passes for every modified resource/profile/example (CI gate).
|
|
22
|
+
|
|
23
|
+
## Bundle / search / concurrency
|
|
24
|
+
- List endpoints use **Bundle/searchset** semantics (`_count`, `_offset`/`_page`, `_total`).
|
|
25
|
+
- Errors use `OperationOutcome` (HTTP 422 for validation).
|
|
26
|
+
- `If-Match` honored via the aggregate's concurrency token → FHIR **weak** ETag at the projection boundary (see [[persistence]]).
|
|
27
|
+
|
|
28
|
+
## SMART & Bulk Data
|
|
29
|
+
- SMART app launch (EHR + standalone) MUST be supported — **PKCE mandatory; implicit flow forbidden**; scopes enforced on every endpoint (see [[authorization.domain]]).
|
|
30
|
+
- **Bulk `$export`** supported for authorized backend extraction; de-identification required for analytics/research (see [[hipaa]]).
|
|
31
|
+
|
|
32
|
+
## IHE
|
|
33
|
+
- PIX/PDQ, XDS/XDS.b or MHD, ATNA, CT, BPPC followed where they apply; deviations in `guardrails/domain/healthcare/ihe-conformance.md` (see [[integration-terms]], [[auditing.domain]]).
|
|
34
|
+
|
|
35
|
+
## Related
|
|
36
|
+
- [[domain-driven-design.domain]] · [[terminology]] · [[hl7]] · [[dicom]] · [[consent]] · [[authorization.domain]] · [[api-versioning.domain]] · [[testing.domain]]
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Folder Structure — Healthcare Domain Addenda
|
|
2
|
+
|
|
3
|
+
> Technology base: [[folder-structure]]. Commands: `/aw-spec-gate`. Replace `<SampleProjectName>`.
|
|
4
|
+
|
|
5
|
+
## Additions to the base layout
|
|
6
|
+
```
|
|
7
|
+
src/<SampleProjectName>.Service/
|
|
8
|
+
Infrastructure/Security/ auth handlers, scope evaluators, PHI-access pipeline
|
|
9
|
+
Infrastructure/Auditing/ ATNA + FHIR AuditEvent emitter
|
|
10
|
+
<Module>/Domain/<ValueObject>.cs coded VOs: Codeable, Coding, Quantity, HumanName, ...
|
|
11
|
+
<Module>/Interop/Fhir/ projectors, search-param handlers, IG profiles (see [[fhir]])
|
|
12
|
+
<Module>/Interop/Hl7v2/ inbound parsers + outbound emitters (see [[hl7]])
|
|
13
|
+
<Module>/Interop/Dicom/ DICOMweb adapters (Radiology only) (see [[dicom]])
|
|
14
|
+
tests/<SampleProjectName>.InteropTests/ FHIR-validator conformance (see [[testing.domain]])
|
|
15
|
+
tests/<SampleProjectName>.TestFixtures/ synthetic-PHI + terminology sentinels (see [[testing.domain]])
|
|
16
|
+
docs/interop/ihe-conformance.md · docs/interop/fhir-implementation-guide/
|
|
17
|
+
docs/security/hipaa-controls.md · docs/security/gdpr-controls.md
|
|
18
|
+
```
|
|
19
|
+
- Paths above are **inside the project being built**, not inside the rule corpus — the `docs/` lines
|
|
20
|
+
are artefacts the project produces, and the corpus's own rule files never move there.
|
|
21
|
+
- `Interop/` adapters translate to/from internal commands + projections (see [[vertical-slices.domain]]).
|
|
22
|
+
- Coded value objects follow the FHIR pattern (see [[terminology]], [[coding-standards.domain]]).
|
|
23
|
+
|
|
24
|
+
## Related
|
|
25
|
+
- [[folder-structure]] · [[fhir]] · [[hl7]] · [[dicom]] · [[testing.domain]] · [[vertical-slices.domain]]
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# HIPAA / PHI Protection Standards
|
|
2
|
+
|
|
3
|
+
> NON-NEGOTIABLE. Commands: `/aw-spec-constitution`, `/aw-spec-specify`.
|
|
4
|
+
|
|
5
|
+
## Regime
|
|
6
|
+
PHI/ePHI under **HIPAA** (Privacy + Security + Breach Notification), **HITECH**, **21st Century Cures Act** anti-information-blocking, and **GDPR** where EU subjects apply, plus regional rules.
|
|
7
|
+
|
|
8
|
+
## Minimum necessary
|
|
9
|
+
- Every PHI read/write endpoint enforces **minimum-necessary** — return only fields the caller's role + SMART scopes authorize.
|
|
10
|
+
- Field-level redaction lives in **projection extensions**, not controllers (see [[fhir]], [[authorization.domain]]).
|
|
11
|
+
|
|
12
|
+
## Audit & consent
|
|
13
|
+
- Every PHI read/mutation, authentication, consent change, export, and break-the-glass MUST emit an immutable audit record (see [[auditing.domain]]).
|
|
14
|
+
- Consent is a first-class aggregate; the pipeline checks it before releasing PHI outside the treating-provider context (see [[consent]]).
|
|
15
|
+
|
|
16
|
+
## Encryption
|
|
17
|
+
- **AES-256 at rest** (TDE + CMK), **TLS 1.2+** in transit (1.3 target), encrypted backups.
|
|
18
|
+
- App-level field encryption for SSN, government IDs, payment-card data, behavioral-health flags (see [[data-classification.domain]]).
|
|
19
|
+
|
|
20
|
+
## De-identification
|
|
21
|
+
- Exports to analytics/research/non-prod MUST pass a **Safe-Harbor OR Expert-Determination** service.
|
|
22
|
+
- **Production PHI in dev/test/demo/CI is FORBIDDEN** — use synthetic-PHI fixtures (see [[testing.domain]]). De-identification without a documented method is a refusal condition (see [[ai-rules.domain]]).
|
|
23
|
+
|
|
24
|
+
## Retention & rights
|
|
25
|
+
- `AuditRecord` >= 6 yrs; clinical per jurisdiction (US >= 6 yrs adult, longer for minors); financial >= 7 yrs; backups under the same CMK (see [[persistence.domain]]).
|
|
26
|
+
- Access, amendment, restriction, accounting-of-disclosures, erasure (GDPR Art. 17) are first-class commands with their own audit; where law forbids erasing medical records, **restriction-of-processing** is the fallback (see [[consent]]).
|
|
27
|
+
|
|
28
|
+
## Breach, BAA, SSoT
|
|
29
|
+
- Anomalous access (volume spikes, off-hours mass reads, repeated denials) emits **Critical** alerts.
|
|
30
|
+
- Any outbound integration transmitting PHI is gated by a **BAA flag**; absence MUST refuse the integration at startup.
|
|
31
|
+
- Authoritative system of record; consumers use FHIR / REST / CloudEvents / Bulk `$export` — **direct DB access FORBIDDEN** (see [[eventing]]).
|
|
32
|
+
|
|
33
|
+
## Related
|
|
34
|
+
- [[auditing.domain]] · [[consent]] · [[data-classification.domain]] · [[authorization.domain]] · [[zero-trust.domain]] · [[persistence.domain]] · [[testing.domain]] · [[ai-rules.domain]]
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# HL7 v2 Standards
|
|
2
|
+
|
|
3
|
+
> Commands: `/aw-spec-constitution`, `/aw-spec-specify`.
|
|
4
|
+
|
|
5
|
+
## Adapters (not a parallel model)
|
|
6
|
+
- HL7 v2.x (**ADT, ORM, ORU, SIU, MDM, DFT**) MUST be supported via an **ingress adapter** → internal commands; an **egress adapter** converts domain events → outbound messages.
|
|
7
|
+
- Adapters live in `{Module}/Interop/Hl7v2/`; translate via `IMediator` — **MUST NOT** write aggregates directly (see [[eventing]], [[domain-driven-design]]). Bypassing them from an external feed is an AI refusal condition (see [[ai-rules.domain]]).
|
|
8
|
+
- Conformance tested against an **internal corpus** (see [[testing]]).
|
|
9
|
+
|
|
10
|
+
## MLLP
|
|
11
|
+
- The HL7v2 broker (MLLP) is an Aspire resource referenced via `.WithReference(...)`; hosts/ports discovered through Aspire, never hard-coded.
|
|
12
|
+
- Ingest target: **50 messages/sec per channel**; trace context propagates across HL7v2 outbound calls (see [[auditing]]).
|
|
13
|
+
|
|
14
|
+
## Related
|
|
15
|
+
- [[fhir]] · [[eventing]] · [[integration-terms]] · [[domain-driven-design]] · [[testing]]
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# IHE Conformance Notes — Patients / RegisterPatient
|
|
2
|
+
|
|
3
|
+
Tracks IHE-profile conformance and deliberate scope decisions for the RegisterPatient feature.
|
|
4
|
+
|
|
5
|
+
## PIX / PDQ (Patient Identifier Cross-referencing / Patient Demographics Query)
|
|
6
|
+
|
|
7
|
+
- **In scope (delivered):** populate-and-link. Each registered patient carries a system-assigned
|
|
8
|
+
tenant MRN plus retained external identifiers (HL7 v2 PID-3) with their assigning authorities, so
|
|
9
|
+
the patient is cross-referenceable. `ResolvePatientIdentifiersQuery` resolves a patient's full
|
|
10
|
+
identifier set from any one known identifier (`Patients/Interop/Pix/`).
|
|
11
|
+
- **Deferred (follow-up feature):** standing up full **PIX Manager** / **PDQ Supplier** query-responder
|
|
12
|
+
endpoints, and outbound notification to an external/central MPI. Decision recorded per
|
|
13
|
+
`/aw-spec-clarify` Q3 and `research.md` R8.
|
|
14
|
+
|
|
15
|
+
## ATNA (Audit Trail and Node Authentication)
|
|
16
|
+
|
|
17
|
+
- Every PHI command/query emits a PHI-free, ATNA-shaped access record via the
|
|
18
|
+
`PhiAccessAuditBehavior` mediator behavior; entity writes are additionally captured by the
|
|
19
|
+
framework's advanced auditing. Node authentication (mTLS between nodes) is a deployment concern.
|
|
20
|
+
|
|
21
|
+
## HL7 v2 ADT
|
|
22
|
+
|
|
23
|
+
- Inbound ADT^A04 over MLLP with accept/receipt ACK; outbound ADT^A04 on `PatientRegisteredEvent`.
|
|
24
|
+
Conformance tested against an internal corpus (`AppWeaver.Health.TestFixtures`).
|
|
25
|
+
|
|
26
|
+
## Known follow-ups
|
|
27
|
+
|
|
28
|
+
- **Tenant-scoped MRN uniqueness:** the generated migration currently creates a *global* unique index
|
|
29
|
+
`UX_Patients_Mrn`. Confirm the framework tenancy discriminator column and change to a composite
|
|
30
|
+
unique index `(TenantId, Mrn)` so the "same MRN in a different tenant" edge case is permitted.
|
|
31
|
+
- **FHIR CapabilityStatement / StructureDefinition** packaging and validator CI gate (HG1/HG2).
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Glossary — Integration Terms
|
|
2
|
+
|
|
3
|
+
> Ubiquitous language for interoperability standards + IHE profiles. Commands: `/aw-spec-specify`.
|
|
4
|
+
|
|
5
|
+
| Term | Definition |
|
|
6
|
+
|---|---|
|
|
7
|
+
| **HL7** | **HL7 v2.x** = legacy pipe-delimited messaging (ADT/ORM/ORU/SIU/MDM/DFT) via adapters (see [[hl7]]); **HL7 FHIR** = the resource-based standard (see [[fhir]]). |
|
|
8
|
+
| **FHIR** | Canonical external contract (R4 default, R5 additive); resources are projections over aggregates (see [[fhir]]). |
|
|
9
|
+
| **DICOM** | Imaging standard via DICOMweb (QIDO/WADO/STOW-RS); only metadata persisted here (see [[dicom]]). |
|
|
10
|
+
| **PIX / PDQ** | Patient Identifier Cross-referencing / Demographics Query (IHE) — used by Patients. |
|
|
11
|
+
| **ATNA** | Audit Trail + Node Authentication (IHE); audit records exportable as FHIR `AuditEvent` (see [[auditing.domain]]). |
|
|
12
|
+
| **MHD / XDS / XDS.b** | Document-sharing profiles (IHE); MHD is the FHIR-based lightweight alternative to XDS. |
|
|
13
|
+
| **CT** | Consistent Time (IHE) — synchronized clocks across nodes. |
|
|
14
|
+
| **BPPC** | Basic Patient Privacy Consents (IHE consent profile; see [[consent]]). |
|
|
15
|
+
| **SMART on FHIR** | OAuth2/OIDC app-launch for third-party apps; PKCE mandatory (see [[authorization.domain]]). |
|
|
16
|
+
| **Bulk Data / `$export`** | FHIR Bulk Data spec for population-level extraction; de-identified for analytics (see [[hipaa]]). |
|
|
17
|
+
| **CloudEvents** | CNCF durable async event-stream spec over the broker (see [[eventing]]). |
|
|
18
|
+
| **OpenAPI / CapabilityStatement / AsyncAPI** | Versioned machine-readable contracts for REST / FHIR / events (see [[api-versioning]]). |
|
|
19
|
+
|
|
20
|
+
## Related
|
|
21
|
+
- [[clinical-terms]] · [[fhir]] · [[hl7]] · [[dicom]] · [[eventing.domain]] · [[auditing.domain]] · [[authorization.domain]] · [[api-versioning.domain]]
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Persistence — Healthcare Domain Addenda
|
|
2
|
+
|
|
3
|
+
> Technology base: [[persistence]]. Commands: `/aw-spec-specify`, `/aw-spec-gate`.
|
|
4
|
+
|
|
5
|
+
## Soft delete & retention
|
|
6
|
+
- Hard delete FORBIDDEN for any aggregate holding **clinical/financial/PHI** data — delete logically via `MarkAsDeleted(...)`. All aggregates are soft-deleted (no exemptions).
|
|
7
|
+
- `AuditRecord` is **append-only** — no delete (see [[auditing.domain]]).
|
|
8
|
+
- Retention: `AuditRecord` >= 6 years; clinical per jurisdiction (US >= 6 yrs adult, longer for minors); financial >= 7 years; backups under the same CMK.
|
|
9
|
+
- GDPR Art. 17 erasure → **restriction-of-processing** where law forbids erasing medical records (see [[consent]], [[hipaa]]).
|
|
10
|
+
|
|
11
|
+
## Encryption
|
|
12
|
+
- Production PostgreSQL: **TDE with customer-managed keys (CMK)**.
|
|
13
|
+
- App-level field encryption for SSN, government IDs, payment-card data, behavioral-health flags (see [[data-classification.domain]], [[hipaa]]).
|
|
14
|
+
|
|
15
|
+
## Tenancy & dev data
|
|
16
|
+
- Multi-hospital deployments MAY opt into tenant-per-database; default tenant-per-row.
|
|
17
|
+
- SQLite dev fixtures contain **no PHI** — production PHI in dev/test/CI is FORBIDDEN (see [[hipaa]]).
|
|
18
|
+
|
|
19
|
+
## Related
|
|
20
|
+
- [[persistence]] · [[hipaa]] · [[auditing.domain]] · [[data-classification.domain]] · [[consent]]
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Terminology Standards
|
|
2
|
+
|
|
3
|
+
> NON-NEGOTIABLE. Commands: `/aw-spec-constitution`, `/aw-spec-specify`.
|
|
4
|
+
|
|
5
|
+
## Coded value objects
|
|
6
|
+
- **Coded data MUST use industry terminologies — free-text strings for coded concepts are FORBIDDEN.**
|
|
7
|
+
- Every code-bearing field is a **`Codeable` value object** `{ system, code, version, display }` (mirrors FHIR `CodeableConcept`/`Coding`) — store code, code-system OID/URI, version, display.
|
|
8
|
+
|
|
9
|
+
## Standard terminologies
|
|
10
|
+
| Domain | Terminology |
|
|
11
|
+
|---|---|
|
|
12
|
+
| Diagnoses | ICD-10-CM (US) / ICD-10 (WHO); ICD-11 where required |
|
|
13
|
+
| Procedures (billing / clinical / inpatient) | CPT, HCPCS Level II / SNOMED CT / ICD-10-PCS |
|
|
14
|
+
| Lab observations / document types | LOINC |
|
|
15
|
+
| Clinical concepts (problems, findings, body sites, allergies) | SNOMED CT |
|
|
16
|
+
| Medications | RxNorm (US); NDC (dispense identity); ATC (analytics) |
|
|
17
|
+
| Units of measure | UCUM |
|
|
18
|
+
| Vaccines | CVX (CDC); MVX (manufacturers) |
|
|
19
|
+
|
|
20
|
+
## Validation
|
|
21
|
+
- Hard-coded coded literals FORBIDDEN outside the Terminology module's seed data.
|
|
22
|
+
- Never invent ICD/SNOMED/LOINC/CPT/HCPCS/RxNorm/CVX codes — confirm against the module's value sets (see [[ai-rules.domain]]).
|
|
23
|
+
- Free-text storage where a coded vocabulary applies is a Forbidden Pattern.
|
|
24
|
+
|
|
25
|
+
## Terminology module
|
|
26
|
+
- Lookup/validation/expansion **MUST** go through a dedicated **Terminology module** (internal cache or external TS via FHIR `$expand` / `$validate-code`).
|
|
27
|
+
- Aggregates: `CodeSystem`, `ValueSet`, `ConceptMap` (project-managed subsets; expansions cached).
|
|
28
|
+
|
|
29
|
+
## Related
|
|
30
|
+
- [[fhir]] · [[domain-driven-design.domain]] · [[clinical-terms]] · [[testing.domain]] · [[ai-rules.domain]]
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Testing — Healthcare Domain Addenda
|
|
2
|
+
|
|
3
|
+
> Technology base: [[testing]]. Commands: `/aw-spec-gate`.
|
|
4
|
+
|
|
5
|
+
## FHIR & interop tests
|
|
6
|
+
- FHIR endpoints MUST validate against the official **FHIR validator** + project IGs; profile changes ship with test updates in the **same commit** (see [[fhir]]).
|
|
7
|
+
- FHIR projectors MUST have a round-trip test (`domain -> FHIR -> domain`).
|
|
8
|
+
- Contract tests: FHIR validator + Inferno (or equiv) for US Core/the IG; HL7 v2 conformance against an internal corpus (see [[hl7]]); CloudEvents schema validation by every consumer harness (see [[eventing.domain]]).
|
|
9
|
+
|
|
10
|
+
## Test data
|
|
11
|
+
- MUST use the synthetic-PHI fixture library (`<SampleProjectName>.TestFixtures`); **production PHI in dev/test/demo/CI is FORBIDDEN** (see [[hipaa]]).
|
|
12
|
+
- Coded values use sentinel constants (e.g. `TerminologyFixtures.IcdSampleHypertension`) — never invented ICD/SNOMED/LOINC/CPT codes (see [[terminology]], [[ai-rules.domain]]).
|
|
13
|
+
|
|
14
|
+
## Related
|
|
15
|
+
- [[testing]] · [[fhir]] · [[hl7]] · [[terminology]] · [[hipaa]] · [[ai-rules.domain]]
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# UX Rule — Accessibility Standards (healthcare)
|
|
2
|
+
|
|
3
|
+
> Loaded under `## /aw-spec-specify` in a project's `tech-rule-bindings.md`. A methodology
|
|
4
|
+
> rule: it governs how the conformance obligation is stated in the spec so that `ui-design`
|
|
5
|
+
> and the UI code gate can verify it.
|
|
6
|
+
|
|
7
|
+
## Why this is a spec concern at all
|
|
8
|
+
|
|
9
|
+
`ui-design` and `ui-implement` author from the **spec**, never from the rule corpus. An
|
|
10
|
+
accessibility obligation that lives only here reaches no UI phase and is gated by nothing. The
|
|
11
|
+
lift into a `UX-n` is what makes it binding.
|
|
12
|
+
|
|
13
|
+
## Rules
|
|
14
|
+
|
|
15
|
+
1. **Name the target, the level, and the surface it covers.** "Meets WCAG 2.2 Level AA on
|
|
16
|
+
every user-facing surface" is checkable. "Is accessible" is not, and fails the gate as an
|
|
17
|
+
unverifiable standard.
|
|
18
|
+
2. **State the assistive-technology floor in Experience Scope**, not in the standard. The
|
|
19
|
+
standard says conformance; the scope says which readers and input modes define it. The two
|
|
20
|
+
are separated so a floor change does not rewrite the standard.
|
|
21
|
+
3. **Keyboard operability is stated against the User Stories.** The obligation is that every
|
|
22
|
+
task the spec lists as a `US-n` is completable keyboard-only. That binds the standard to
|
|
23
|
+
this aggregate's actual work rather than to a generic surface.
|
|
24
|
+
4. **Clinical-safety accessibility is not decoration.** In this domain, colour is never the sole
|
|
25
|
+
carrier of a status that affects a clinical decision, alerts are announced to assistive
|
|
26
|
+
technology, and a dismissible warning is re-reachable. State these as `UX-n` standards.
|
|
27
|
+
5. **A waiver is an id, a reason and an expiry.** An accessibility exception is recorded against
|
|
28
|
+
the `UX-n` id it relaxes, time-boxed, and expires. An unrecorded exception is a defect.
|
|
29
|
+
6. **Regulatory accessibility obligations lift as themselves.** Where a jurisdiction imposes a
|
|
30
|
+
conformance regime on patient-facing software, that obligation is a `UX-n` citing the regime.
|
|
31
|
+
Where the same regime also imposes a records or retention duty, that half stays a `CN-n`.
|
|
32
|
+
|
|
33
|
+
## What must NOT appear
|
|
34
|
+
|
|
35
|
+
ARIA attributes, roles, landmark structure, tab order, contrast values for a specific palette,
|
|
36
|
+
component libraries, or linter configuration. Those are how the standard is met.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# UX Rule — Content Design (healthcare)
|
|
2
|
+
|
|
3
|
+
> Loaded under `## /aw-spec-specify` in a project's `tech-rule-bindings.md`. A methodology
|
|
4
|
+
> rule: it governs the language obligations the spec carries into the UI lane.
|
|
5
|
+
|
|
6
|
+
## Rules
|
|
7
|
+
|
|
8
|
+
1. **The UI speaks the ubiquitous language.** User-facing terms are the terms in Key Entities.
|
|
9
|
+
Where the interface must show a term the domain does not use, the spec says which term and
|
|
10
|
+
why; an unmapped synonym invented in a component is a defect against the domain model.
|
|
11
|
+
2. **Every error names what happened and what to do next.** State this once as a `UX-n`. A
|
|
12
|
+
message that reports a failure without an action is not a message, it is a dead end — see
|
|
13
|
+
`interaction-states.md`.
|
|
14
|
+
3. **Regulated wording is reproduced verbatim.** Consent text, safety warnings, and any wording
|
|
15
|
+
a regulator or a labelling authority fixes are quoted exactly and never paraphrased,
|
|
16
|
+
truncated or localised without the approved translation. Lift the obligation as a `UX-n` and
|
|
17
|
+
the retention or audit duty attached to it as a `CN-n`.
|
|
18
|
+
4. **Clinical values carry their units and their provenance.** A displayed measurement without
|
|
19
|
+
its unit is unsafe; a value drawn from an external feed is attributable. State the obligation
|
|
20
|
+
here, state the classification of the field itself in `DC-n`.
|
|
21
|
+
5. **Identity display is a classification decision, not a wording one.** What may appear on a
|
|
22
|
+
surface — and what must not appear in logs, metrics or traces — is `DC-n`. This section
|
|
23
|
+
governs only how the permitted content reads.
|
|
24
|
+
6. **Localisation is structural where it applies.** Where the product ships more than one
|
|
25
|
+
locale, state as a `UX-n` that user-visible strings come from a catalogue and that dates,
|
|
26
|
+
numbers and units format locale-aware at the boundary. Where it ships one, say so in
|
|
27
|
+
Experience Scope and omit the standard.
|
|
28
|
+
|
|
29
|
+
## What must NOT appear
|
|
30
|
+
|
|
31
|
+
Final copy, message strings, tone-of-voice guides, or per-screen wording. The spec states the
|
|
32
|
+
obligation the wording must satisfy; the prototype and the design system settle the words.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# UX Rule — Interaction States (healthcare)
|
|
2
|
+
|
|
3
|
+
> Loaded under `## /aw-spec-specify` in a project's `tech-rule-bindings.md`. A methodology
|
|
4
|
+
> rule: it governs how the spec expresses what the user meets while the system works, never
|
|
5
|
+
> how any of it is rendered.
|
|
6
|
+
|
|
7
|
+
## The split this rule exists to hold
|
|
8
|
+
|
|
9
|
+
Two things look alike and belong in different sections:
|
|
10
|
+
|
|
11
|
+
| Statement | Home | Why |
|
|
12
|
+
|---|---|---|
|
|
13
|
+
| "Every asynchronous operation presents its loading, empty, partial-failure, recovery and success states" | **`UX-n`** | project-wide standard, true of every surface |
|
|
14
|
+
| "IF the allergy list cannot be retrieved THEN THE SYSTEM SHALL present the last known list marked stale and offer retry" | **`FR-n`** | this aggregate's behaviour, in EARS |
|
|
15
|
+
|
|
16
|
+
The standard is lifted once. The behaviour is specified per aggregate, in EARS, using the
|
|
17
|
+
unwanted-behaviour patterns the spec template already defines.
|
|
18
|
+
|
|
19
|
+
## Rules
|
|
20
|
+
|
|
21
|
+
1. **Enumerate the states, do not draw them.** The states are loading, empty, partial,
|
|
22
|
+
failure, recovery, success and — where the domain requires it — stale and degraded. The
|
|
23
|
+
spec says which must be handled; the prototype says what they look like.
|
|
24
|
+
2. **No dead end.** A `UX-n` states that no reachable state leaves the user without a next
|
|
25
|
+
action. A state the UI can reach and the spec does not describe is a spec defect routed
|
|
26
|
+
back to `specify`, never invented in a component.
|
|
27
|
+
3. **Partial failure is stated, not implied.** Where a surface composes several sources, the
|
|
28
|
+
spec states whether a partial result is presentable and how it is marked. In this domain the
|
|
29
|
+
default is that partial clinical data is presentable ONLY when its incompleteness is
|
|
30
|
+
explicit; silence here is a defect, not a default.
|
|
31
|
+
4. **Staleness is a clinical fact.** Where cached or last-known data may be shown, say so as an
|
|
32
|
+
`FR-n` and carry the project-wide marking obligation as a `UX-n`. Data whose currency
|
|
33
|
+
affects a clinical decision is never presented as current when it is not.
|
|
34
|
+
5. **Destructive and irreversible actions state their confirmation obligation** as a `UX-n`,
|
|
35
|
+
and their specific consequence as an `FR-n` or `BR-n`.
|
|
36
|
+
6. **Responsiveness is a bound, not a behaviour.** Acknowledgement and progress thresholds are
|
|
37
|
+
`UX-n` limits. Where the bound depends on a server-side budget, that budget stays a `CN-n`
|
|
38
|
+
and the two cross-reference — the service-side gates read `CN-` and never read the
|
|
39
|
+
Experience Standards.
|
|
40
|
+
|
|
41
|
+
## What must NOT appear
|
|
42
|
+
|
|
43
|
+
Spinners, skeletons, toasts, banners, placement, animation, timing curves, or any component
|
|
44
|
+
name. Those realise the state; they are not the state.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# UX Rule — Journey Mapping (healthcare)
|
|
2
|
+
|
|
3
|
+
> Loaded under `## /aw-spec-specify` in a project's `tech-rule-bindings.md`. It is a
|
|
4
|
+
> **methodology** rule: it governs how `specify` expresses the experience in the spec, not
|
|
5
|
+
> what any screen looks like. Tier is set by the map that lists it, not by the folder it
|
|
6
|
+
> sits in — this file lives in the domain corpus and is loaded as a technical input.
|
|
7
|
+
|
|
8
|
+
## What this rule governs
|
|
9
|
+
|
|
10
|
+
The spec states the user's **path through a task** as a `US-n` user story and the standards
|
|
11
|
+
that path must hold to as `UX-n` entries. It never states the route the user takes through a
|
|
12
|
+
UI. One story may become one screen or five; that is the prototype's and `design.ui.md`'s
|
|
13
|
+
decision, and a spec that pre-empts it has specified the solution.
|
|
14
|
+
|
|
15
|
+
## Rules
|
|
16
|
+
|
|
17
|
+
1. **A journey is a `US-n`, not a new id class.** A user story is already defined as a
|
|
18
|
+
prioritized, independently testable journey. An experience journey uses that definition
|
|
19
|
+
unchanged — the actor, the goal, the acceptance criteria in Given/When/Then.
|
|
20
|
+
2. **State the outcome, never the mechanism.** "A clinician can reconcile a medication list
|
|
21
|
+
for one patient in a single sitting" is a journey. "A clinician opens the reconciliation
|
|
22
|
+
tab, clicks Compare, then Accept All" is a click-path and belongs in the prototype.
|
|
23
|
+
3. **Every journey names the actor from Experience Scope.** A story whose actor is not listed
|
|
24
|
+
there is either an unlisted actor or a story that does not belong to this aggregate.
|
|
25
|
+
4. **Interruption is a first-class case in this domain.** Clinical work is interrupted; a
|
|
26
|
+
journey that cannot survive being abandoned mid-task and resumed is under-specified. Where
|
|
27
|
+
resumability is required, state it as an acceptance criterion on the `US-n`, and state the
|
|
28
|
+
project-wide expectation once as a `UX-n`.
|
|
29
|
+
5. **Journey integrity is a `UX-n` standard.** Completability without leaving the aggregate's
|
|
30
|
+
surface, confirmation and reversibility of destructive actions, and preservation of entered
|
|
31
|
+
work across a failure are standards that hold for every journey — lift them once, do not
|
|
32
|
+
repeat them per story.
|
|
33
|
+
6. **Hand-offs between actors are journeys too.** Where a task passes from one role to another
|
|
34
|
+
(order → verification → administration), the hand-off is part of the journey and its state
|
|
35
|
+
at the boundary is stated in the acceptance criteria.
|
|
36
|
+
|
|
37
|
+
## What must NOT appear
|
|
38
|
+
|
|
39
|
+
Screens, pages, tabs, wizards, step counts, navigation structure, button labels, modal-vs-inline
|
|
40
|
+
choices, or any statement whose only realisation is one layout.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Vertical Slices — Healthcare Domain Addenda
|
|
2
|
+
|
|
3
|
+
> Technology base: [[vertical-slices]]. Commands: `/aw-spec-specify`, `/aw-spec-gate`.
|
|
4
|
+
|
|
5
|
+
## Interop adapters in the slice
|
|
6
|
+
`{Module}/Interop/` carries the external-protocol adapters:
|
|
7
|
+
```
|
|
8
|
+
Fhir/ projectors, search-param handlers, IG profiles (see [[fhir]])
|
|
9
|
+
Hl7v2/ inbound parsers + outbound emitters (see [[hl7]])
|
|
10
|
+
Dicom/ DICOMweb adapters (Radiology only) (see [[dicom]])
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Rules
|
|
14
|
+
- FHIR resources live in a **parallel projection layer** and **MUST NOT** replace internal `Shared` DTOs (see [[fhir]]).
|
|
15
|
+
- Domain DTOs (`PatientDto`, `EncounterDto`) — no setters, required `init`, base64 `RowVersionBase64`.
|
|
16
|
+
|
|
17
|
+
## Related
|
|
18
|
+
- [[vertical-slices]] · [[fhir]] · [[hl7]] · [[dicom]]
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Zero-Trust — Healthcare Domain Addenda
|
|
2
|
+
|
|
3
|
+
> Technology base: [[zero-trust]]. Commands: `/aw-spec-constitution`, `/aw-spec-specify`, `/aw-spec-gate`.
|
|
4
|
+
|
|
5
|
+
## Rules
|
|
6
|
+
- **PHI in transit MUST be TLS-encrypted**; at-rest encryption: see [[hipaa]], [[data-classification.domain]].
|
|
7
|
+
- External IdP MUST be SMART-on-FHIR-capable; tokens/scopes enforced on every FHIR endpoint and propagated through the pipeline (see [[authorization.domain]], [[fhir]]).
|
|
8
|
+
- IHE **ATNA** node authentication applies to inter-node communication (see [[auditing.domain]]).
|
|
9
|
+
- Trace context MUST propagate across outbound **HL7v2 / DICOM / FHIR** calls (see [[eventing.domain]]).
|
|
10
|
+
|
|
11
|
+
## Related
|
|
12
|
+
- [[zero-trust]] · [[authorization.domain]] · [[auditing.domain]] · [[hipaa]] · [[fhir]]
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# AI Operational Rules — Pharma Domain Addenda
|
|
2
|
+
|
|
3
|
+
> Technology base: [[ai-rules]]. Commands: **ALL**.
|
|
4
|
+
|
|
5
|
+
## Context & codes
|
|
6
|
+
- FHIR types: use the **official FHIR .NET SDK**, version-matched (R4/R5) to the endpoint (see [[fhir]]).
|
|
7
|
+
- Confirm coded values against the Terminology module's value sets; never invent NDC/UNII/RxNorm/SNOMED/ATC/UCUM codes (see [[terminology]], [[ndc]], [[atc]]).
|
|
8
|
+
- Align aggregates to ISO IDMP concept boundaries, not ad-hoc shapes (see [[idmp]]).
|
|
9
|
+
|
|
10
|
+
## Generation
|
|
11
|
+
- `MedicinalProduct` is the Aggregate Root. Generate `NdcCode`/`ProductName`/`GenericName`/`Strength`/`DosageForm`/`RouteOfAdministration`/`AtcCode`/`MarketingStatus`/`PackageIdentifier` as **value objects**, and `ActiveIngredient`/`PackagingConfiguration`/`MarketingAuthorization` as **entities** (see [[domain-driven-design.domain]]).
|
|
12
|
+
- A complete slice adds (when applicable): FHIR projector + FHIR-validator test, audit emission, version snapshot (see [[fhir]], [[auditing.domain]], [[persistence.domain]], [[testing.domain]]).
|
|
13
|
+
- FHIR resources are projections — never a second FHIR write path bypassing the aggregate (see [[fhir]]).
|
|
14
|
+
- Comments are reserved for regulatory/domain intent (generic rule in [[ai-rules]]).
|
|
15
|
+
|
|
16
|
+
## Identifier & code safety
|
|
17
|
+
- MUST NOT fabricate NDC values or Labeler Codes; MUST NOT invent ATC/UNII/RxNorm/SNOMED codes — use a sentinel constant (e.g. `TerminologyFixtures.AtcSample`) or the Terminology module (see [[testing.domain]], [[terminology]], [[ndc]], [[atc]]).
|
|
18
|
+
- MUST attach a `ProvenanceRecord` on any external-import path (see [[data-provenance]]).
|
|
19
|
+
|
|
20
|
+
## Security- & compliance-touching code
|
|
21
|
+
- MUST NOT modify audit emitters, version-history writers, lifecycle-transition guards, or identifier-uniqueness checks without an explicit reviewer-attached prompt (see [[auditing.domain]], [[persistence.domain]], [[product-lifecycle.domain]], [[ndc]]).
|
|
22
|
+
|
|
23
|
+
## Refusal conditions — extend [[ai-rules]]; refuse to:
|
|
24
|
+
- Invent or hard-code NDC/ATC/UNII/RxNorm/SNOMED codes outside terminology seed data (see [[terminology]]).
|
|
25
|
+
- Persist a product with an invalid NDC, invalid dosage form, invalid route, or unvalidated ATC code (see [[ndc]], [[terminology]], [[atc]]).
|
|
26
|
+
- Hard-delete a `MedicinalProduct`, its history, or an `AuditRecord` (use lifecycle retirement / logical delete) (see [[persistence.domain]], [[auditing.domain]]).
|
|
27
|
+
- Allow an invalid lifecycle transition or remove a transition guard (see [[product-lifecycle.domain]]).
|
|
28
|
+
- Bypass Interop adapters by writing aggregates directly from an external feed (see [[hl7]], [[eventing.domain]]).
|
|
29
|
+
- Suppress or weaken audit emission for create/modify/retire/identifier/classification changes (see [[auditing.domain]], [[regulatory-compliance]]).
|
|
30
|
+
|
|
31
|
+
## Related
|
|
32
|
+
- [[ai-rules]] · [[domain-driven-design.domain]] · [[ndc]] · [[idmp]] · [[atc]] · [[terminology]] · [[fhir]] · [[auditing.domain]] · [[persistence.domain]] · [[product-lifecycle.domain]] · [[data-provenance]] · [[testing.domain]]
|