diff --git a/.github/workflows/firely-validation.yml b/.github/workflows/firely-validation.yml
new file mode 100644
index 00000000..5fe1469f
--- /dev/null
+++ b/.github/workflows/firely-validation.yml
@@ -0,0 +1,59 @@
+# This is a basic workflow to help you get started with Actions
+
+name: Firely Validation
+
+# Controls when the action will run.
+on:
+ # Triggers the workflow on push or pull request events but only for the master branch
+ push:
+ branches:
+ - '**'
+ pull_request:
+ branches: [ master, main ]
+ # Allows you to run this workflow manually from the Actions tab
+ workflow_dispatch:
+
+# A workflow run is made up of one or more jobs that can run sequentially or in parallel
+jobs:
+
+ # Validate all resources using Firely Terminal
+ CI_FHIR_VALIDATION:
+ # The type of runner that the job will run on
+ runs-on: ubuntu-latest
+
+ # Steps represent a sequence of tasks that will be executed as part of the job
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v6
+
+ # Install .NET runtime
+ - name: Setup .NET Core SDK
+ uses: actions/setup-dotnet@v5
+ with:
+ dotnet-version: 8.0.x
+
+ # Install Java runtime (only needed if you want to run the offical HL7 Java validator)
+ - name: Setup Java JDK
+ uses: actions/setup-java@v5
+ with:
+ distribution: 'microsoft'
+ java-version: '21'
+
+ - name: Firely.Terminal (GitHub Actions)
+ uses: FirelyTeam/firely-terminal-pipeline@v0.7.31
+ with:
+ PATH_TO_CONFORMANCE_RESOURCES: StructureDefinition ValueSet CodeSystem
+ PATH_TO_EXAMPLES: ActivityDefinition AuditEvent BodyStructure Bundle CapabilityStatement Composition ConceptMap Condition Consent Device DiagnosticReport DocumentReference FamilyMemberHistory GraphDefinition Group Library MessageDefinition MessageHeader NamingSystem Observation OperationDefinition OperationOutcome Organization Parameters Patient PlanDefinition Practitioner PractitionerRole Procedure Provenance Questionnaire QuestionnaireResponse RelatedPerson RequestGroup SearchParameter ServiceRequest Specimen SpecimenDefinition StructureMap Subscription Task
+ PATH_TO_QUALITY_CONTROL_RULES: custom
+ DOTNET_VALIDATION_ENABLED: true
+ JAVA_VALIDATION_ENABLED: false
+ #EXPECTED_FAILS: VALIDATION_EXAMPLES_JAVA
+ SIMPLIFIER_USERNAME: ${{ secrets.SIMPLIFIER_USERNAME }}
+ SIMPLIFIER_PASSWORD: ${{ secrets.SIMPLIFIER_PASSWORD }}
+ FIRELY_TERMINAL_VERSION: 3.5.0
+ SUSHI_ENABLED: false
+
+ # - name: Add & Commit.
+ # uses: EndBug/add-and-commit@v9
+ # with:
+ # add: 'fsh-generated/resources/'
\ No newline at end of file
diff --git a/.github/workflows/terminology.yml b/.github/workflows/terminology.yml
index eb43eec7..2b54685a 100644
--- a/.github/workflows/terminology.yml
+++ b/.github/workflows/terminology.yml
@@ -5,7 +5,7 @@ on:
# Triggers the workflow on push or pull request events but only for the master branch
# Allows you to run this workflow manually from the Actions tab
- push:
+ #push:
workflow_dispatch:
diff --git a/ConceptMap/ConceptMap-bsa-prescription-type-to-mim-organisation-type.json b/ConceptMap/ConceptMap-bsa-prescription-type-to-mim-organisation-type.json
index bb9f609e..9e7c3527 100644
--- a/ConceptMap/ConceptMap-bsa-prescription-type-to-mim-organisation-type.json
+++ b/ConceptMap/ConceptMap-bsa-prescription-type-to-mim-organisation-type.json
@@ -27,6 +27,7 @@
"group": [
{
"source": "https://fhir.nhs.uk/CodeSystem/prescription-type",
+ "sourceVersion": "1.2.0",
"target": "https://fhir.nhs.uk/CodeSystem/mim-organisation-type",
"element": [
{
diff --git a/ConceptMap/MedicationRequest-course-therapy-type-map.xml b/ConceptMap/MedicationRequest-course-therapy-type-map.xml
index bf132719..48d6014f 100644
--- a/ConceptMap/MedicationRequest-course-therapy-type-map.xml
+++ b/ConceptMap/MedicationRequest-course-therapy-type-map.xml
@@ -21,7 +21,7 @@
-
+
diff --git a/Examples/SDS-Endpoint-Bundle-Example.xml b/Examples/SDS-Endpoint-Bundle-Example.xml
index 20bb1498..8d5ea19b 100644
--- a/Examples/SDS-Endpoint-Bundle-Example.xml
+++ b/Examples/SDS-Endpoint-Bundle-Example.xml
@@ -4,10 +4,10 @@
-
+
-
+
diff --git a/MedicationRequest/MedicationRequest-WithoutGroupID-Example.xml b/MedicationRequest/MedicationRequest-WithoutGroupID-Example.xml
new file mode 100644
index 00000000..a59348be
--- /dev/null
+++ b/MedicationRequest/MedicationRequest-WithoutGroupID-Example.xml
@@ -0,0 +1,71 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/MessageDefinition/MessageDefinition-document.xml b/MessageDefinition/MessageDefinition-document.xml
index 25ce7e4c..ffb4f462 100644
--- a/MessageDefinition/MessageDefinition-document.xml
+++ b/MessageDefinition/MessageDefinition-document.xml
@@ -10,12 +10,12 @@
+
-
diff --git a/MessageDefinition/MessageDefinition-prescription-order.xml b/MessageDefinition/MessageDefinition-prescription-order.xml
index 01a16ccf..b8705a42 100644
--- a/MessageDefinition/MessageDefinition-prescription-order.xml
+++ b/MessageDefinition/MessageDefinition-prescription-order.xml
@@ -10,8 +10,8 @@
+
-
diff --git a/NamingSystem/prescription-type-ns.xml b/NamingSystem/prescription-type-ns.xml
deleted file mode 100644
index 0f4e48e1..00000000
--- a/NamingSystem/prescription-type-ns.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/NamingSystem/ukcore-prescription-type-ns.xml b/NamingSystem/ukcore-prescription-type-ns.xml
deleted file mode 100644
index 3906808b..00000000
--- a/NamingSystem/ukcore-prescription-type-ns.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/OperationDefinition/MessageHeader-prepare-message.xml b/OperationDefinition/MessageHeader-prepare-message.xml
index f8ece070..0ba4b79c 100644
--- a/OperationDefinition/MessageHeader-prepare-message.xml
+++ b/OperationDefinition/MessageHeader-prepare-message.xml
@@ -15,9 +15,9 @@
+
-
diff --git a/OperationDefinition/OperationDefinition-prescription-release.xml b/OperationDefinition/OperationDefinition-prescription-release.xml
index 7472e171..327e9c24 100644
--- a/OperationDefinition/OperationDefinition-prescription-release.xml
+++ b/OperationDefinition/OperationDefinition-prescription-release.xml
@@ -18,8 +18,8 @@
-
+
diff --git a/OperationDefinition/OperationDefinition-release.xml b/OperationDefinition/OperationDefinition-release.xml
index d78a5d6e..2b074a27 100644
--- a/OperationDefinition/OperationDefinition-release.xml
+++ b/OperationDefinition/OperationDefinition-release.xml
@@ -18,8 +18,8 @@
-
+
diff --git a/StructureDefinition/Extension-NHSDigital-Provenance-agent.StructureDefinition.xml b/StructureDefinition/Extension-NHSDigital-Provenance-agent.StructureDefinition.xml
index bfdadf2e..e6c0cf03 100644
--- a/StructureDefinition/Extension-NHSDigital-Provenance-agent.StructureDefinition.xml
+++ b/StructureDefinition/Extension-NHSDigital-Provenance-agent.StructureDefinition.xml
@@ -2,8 +2,8 @@
-
+
diff --git a/StructureDefinition/NHSDigital-Logical-Event.StructureDefinition.xml b/StructureDefinition/NHSDigital-Logical-Event.StructureDefinition.xml
index da37cb2b..d8aacf17 100644
--- a/StructureDefinition/NHSDigital-Logical-Event.StructureDefinition.xml
+++ b/StructureDefinition/NHSDigital-Logical-Event.StructureDefinition.xml
@@ -11,16 +11,13 @@
-
-
+
+
-
-
-
-
+
-
-
+
+
@@ -29,8 +26,8 @@
-
-
+
+
@@ -39,8 +36,8 @@
-
-
+
+
@@ -49,8 +46,8 @@
-
-
+
+
@@ -58,8 +55,8 @@
-
-
+
+
@@ -68,8 +65,8 @@
-
-
+
+
diff --git a/StructureDefinition/NHSDigital-Logical-Request.StructureDefinition.xml b/StructureDefinition/NHSDigital-Logical-Request.StructureDefinition.xml
index 655d6915..5e8e9c47 100644
--- a/StructureDefinition/NHSDigital-Logical-Request.StructureDefinition.xml
+++ b/StructureDefinition/NHSDigital-Logical-Request.StructureDefinition.xml
@@ -1,36 +1,32 @@
-
+
-
+
-
-
+
+
-
-
-
-
+
-
-
+
+
-
-
-
+
+
@@ -39,8 +35,8 @@
-
-
+
+
@@ -51,8 +47,8 @@
-
-
+
+
@@ -60,8 +56,8 @@
-
-
+
+
@@ -69,8 +65,8 @@
-
-
+
+
diff --git a/StructureDefinition/NHSDigital-Medication.StructureDefinition.xml b/StructureDefinition/NHSDigital-Medication.StructureDefinition.xml
index 68f0bdcc..9945fc5f 100644
--- a/StructureDefinition/NHSDigital-Medication.StructureDefinition.xml
+++ b/StructureDefinition/NHSDigital-Medication.StructureDefinition.xml
@@ -1,9 +1,9 @@
+
-
diff --git a/StructureDefinition/NHSDigital-MedicationRequest.xml b/StructureDefinition/NHSDigital-MedicationRequest.xml
index 69ff9ec1..a7f27f63 100644
--- a/StructureDefinition/NHSDigital-MedicationRequest.xml
+++ b/StructureDefinition/NHSDigital-MedicationRequest.xml
@@ -2,11 +2,11 @@
-
+
-
+
@@ -59,12 +59,6 @@
-
-
-
-
-
-
@@ -383,7 +377,6 @@
-
diff --git a/StructureDefinition/NHSDigital-PractitionerRole.StructureDefinition.xml b/StructureDefinition/NHSDigital-PractitionerRole.StructureDefinition.xml
index 18d4683d..89758e7e 100644
--- a/StructureDefinition/NHSDigital-PractitionerRole.StructureDefinition.xml
+++ b/StructureDefinition/NHSDigital-PractitionerRole.StructureDefinition.xml
@@ -2,8 +2,8 @@
+
-
diff --git a/StructureDefinition/NHSDigital-Questionnaire.StructureDefinition.xml b/StructureDefinition/NHSDigital-Questionnaire.StructureDefinition.xml
index 7cbf6c19..52d4a33d 100644
--- a/StructureDefinition/NHSDigital-Questionnaire.StructureDefinition.xml
+++ b/StructureDefinition/NHSDigital-Questionnaire.StructureDefinition.xml
@@ -2,9 +2,9 @@
+
-
diff --git a/ValueSet/ValueSet-DM-prescription-type.xml b/ValueSet/ValueSet-DM-prescription-type.xml
index b60fe709..2a1709d4 100644
--- a/ValueSet/ValueSet-DM-prescription-type.xml
+++ b/ValueSet/ValueSet-DM-prescription-type.xml
@@ -22,11 +22,6 @@
-
-
-
-
-
diff --git a/ValueSet/ValueSet-DM-task-business-status.xml b/ValueSet/ValueSet-DM-task-business-status.xml
index ff4ed7a4..fdcb63e5 100644
--- a/ValueSet/ValueSet-DM-task-business-status.xml
+++ b/ValueSet/ValueSet-DM-task-business-status.xml
@@ -2,10 +2,10 @@
-
+
-
+
@@ -15,10 +15,9 @@
-
+
+ value="A set of codes used to identify the status of a prescription or the status of an item on a prescription. This ValueSet is a subset of [ValueSet-DM Prescription Task Status Reason](https://simplifier.net/NHSDigital/DM-PrescriptionTaskStatusReason/~overview). Hence, it is a duplicate and the need to o retire it." />
diff --git a/custom.rules.yaml b/custom.rules.yaml
new file mode 100644
index 00000000..ee7754d4
--- /dev/null
+++ b/custom.rules.yaml
@@ -0,0 +1,34 @@
+- action: parse
+ name: parse-fhir-resources
+ status: "Checking if all FHIR Resource files can be parsed"
+ files:
+ - /**/*.json
+ - "!package.json"
+ - "!*.*"
+ - "!.github/*.*"
+ - "!documents/*.*"
+ - "!Diagrams/*.*"
+
+- name: resource-validation
+ status: "Validating resources against the FHIR standard and their profiles"
+ action: validate
+ category: Resource
+ suppress:
+ - 6005
+ - eld-16
+ - ref-1
+ - dom-6
+ - 1012 #ref-1
+ - 4005 #dom-6
+ - CONFIG #errors in dependencies e.g. loops, outdated, pre-release
+ - 6006 #failure to contact term service
+ - 1030 #reference loop
+ - 4009 #missing extensions
+
+- action: unique
+ name: unique-canonicals
+ status: "Checking if all StructureDefinitions have a unique canonical"
+ category: StructureDefinition
+ unique: url
+
+# - include: manifest
diff --git a/fhirpkg.lock.json b/fhirpkg.lock.json
index f149b185..06a46399 100644
--- a/fhirpkg.lock.json
+++ b/fhirpkg.lock.json
@@ -1,5 +1,5 @@
{
- "updated": "2025-07-25T17:27:50.0661131+01:00",
+ "updated": "2026-04-07T12:57:28.4297209+01:00",
"dependencies": {
"hl7.fhir.r4.core": "4.0.1",
"fhir.r4.ukcore.stu3.currentbuild": "0.0.3-pre-release"