Skip to content

Commit f10da7a

Browse files
authored
Merge pull request #711 from NHSDigital/automated/ig-update
Automated Update from Simplifier
2 parents ebfc1a5 + cc364be commit f10da7a

5 files changed

Lines changed: 13 additions & 115 deletions

File tree

guides/UK-Core-Implementation-Guide-STU3-Sequence/Home/ProfilesandExtensions/Derived-Profiles-Table-With-Purpose.page.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
from
33
StructureDefinition
44
where
5-
kind = 'resource' and status = 'active' and id.length() - id.replaceMatches('-', '').length() > 1
5+
kind = 'resource' and (status = 'active' or status = 'draft') and id.length() - id.replaceMatches('-', '').length() > 1
66
select
7-
Profile:id, Purpose:purpose, status, Resource:type
7+
Profile:id, Purpose:purpose, Status:status, Resource:type
88
with
9-
no header
9+
header
1010
</fql>

guides/UK-Core-Implementation-Guide-STU3-Sequence/Home/ProfilesandExtensions/Derived-Profiles-Table.page.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
from
33
StructureDefinition
44
where
5-
kind = 'resource' and status = 'active' and id.length() - id.replaceMatches('-', '').length() > 1
5+
kind = 'resource' and (status = 'active' or status = 'draft') and (id.length() - id.replaceMatches('-', '').length() > 1)
66
select
7-
Profile:id, status
7+
Profile:id, Status:status
88
with
9-
no header
9+
header
1010
</fql>

guides/UK-Core-Implementation-Guide-STU3-Sequence/Home/ProfilesandExtensions/Profiles-Table-With-Purpose.page.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ from
44
where
55
kind = 'resource' and status = 'active' and id.length() - id.replaceMatches('-', '').length() = 1
66
select
7-
Profile:id, Purpose:purpose, status, Resource:type
7+
Profile:id, Purpose:purpose, Status:status, Resource:type
88
with
9-
no header
9+
header
1010
</fql>

guides/UK-Core-Implementation-Guide-STU3-Sequence/Home/ProfilesandExtensions/Profiles-Table.page.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
from
33
StructureDefinition
44
where
5-
kind = 'resource' and status = 'active' and id.length() - id.replaceMatches('-', '').length() = 1
5+
kind = 'resource' and (status = 'active' or status = 'draft') and id.length() - id.replaceMatches('-', '').length() = 1
66
select
7-
Profile:id, status
7+
Profile:id, Status:status
88
with
9-
no header
9+
header
1010
</fql>

guides/UK-Core-Implementation-Guide-STU3-Sequence/Home/Terminology/Terminology-Index.page.md

Lines changed: 2 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ Within this release of the UK Core, ValueSet expansions have been incorporated i
3939
<h3>CodeSystems</h3>
4040
{{page:CodeSystem-table}}
4141
</div>
42+
<!--
4243
4344
<script>
4445
let valueSetsProcessed = false;
@@ -170,113 +171,10 @@ $(document).ready(function () {
170171
processValueSetsTable(); // If ValueSets is shown by default
171172
});
172173
</script>
174+
-->
173175

174176

175-
<!--<fql>
176-
from
177-
ValueSet
178-
where
179-
status !='retired'
180-
select
181-
ValueSet: id, Status: status, CodeSystem: compose.include.system, ValueSets: compose.include.valueSet
182-
order by
183-
id
184-
distinct
185-
</fql>
186177

187-
<script>
188-
$(document).ready(function () {
189-
const queryString = window.location.search || "?version=current";
190-
191-
// Detect if we're in an unpublished guide (which uses .page.md links)
192-
const isUnpublished = window.location.search.includes("version=current");
193-
const pageSuffix = isUnpublished ? ".page.md" : "";
194-
195-
// Convert {{guide-title}} into URL-safe form
196-
const guideTitleUrl = "{{guide-title}}"
197-
.replace(/[^a-zA-Z0-9 ]/g, "") // remove special characters
198-
.replace(/\s+/g, "-"); // convert spaces to hyphens
199-
200-
const baseUrl = `https://simplifier.net/guide/${guideTitleUrl}/Home/`;
201-
const vsBase = `${baseUrl}terminology/valuesets/valueset-`;
202-
const csBase = `${baseUrl}terminology/codesystems/codesystem-`;
203-
204-
const $table = $("table.table-bordered");
205-
if ($table.length === 0) return;
206-
207-
// Update header
208-
const $headerCells = $table.find("thead tr th");
209-
if ($headerCells.length >= 4) {
210-
$headerCells.eq(2).text("Composed of");
211-
$headerCells.eq(3).remove(); // remove 4th column (valueSet)
212-
}
213-
214-
// Process each row
215-
$table.find("tbody tr").each(function () {
216-
const $cells = $(this).find("td");
217-
if ($cells.length < 4) return;
218-
219-
const $nameTd = $cells.eq(0);
220-
const $statusTd = $cells.eq(1);
221-
const $systemTd = $cells.eq(2);
222-
const $valueSetTd = $cells.eq(3);
223-
224-
// --- Linkify name column if UKCore ---
225-
const nameText = $nameTd.text().trim();
226-
if (nameText.startsWith("UKCore")) {
227-
const assetLower = nameText.toLowerCase();
228-
const href = `${vsBase}${assetLower}${pageSuffix}${queryString}`;
229-
$nameTd.html(`<a href="${href}">${nameText}</a>`);
230-
}
231-
232-
// --- Merge & linkify systems and valueSets ---
233-
const combinedLinks = [];
234-
235-
const linkify = (text) => {
236-
text.split(";").forEach(item => {
237-
const trimmed = item.trim();
238-
if (!trimmed) return;
239-
240-
let displayText = trimmed;
241-
let href = trimmed;
242-
243-
if (trimmed.startsWith("https://fhir.hl7.org.uk/")) {
244-
const parts = trimmed.split("/");
245-
const assetType = parts[3];
246-
const assetName = parts[4];
247-
248-
if (assetType && assetName) {
249-
const section = assetType.toLowerCase() === "codesystem" ? csBase
250-
: assetType.toLowerCase() === "valueset" ? vsBase
251-
: null;
252-
253-
if (section) {
254-
const lowerAsset = assetName.toLowerCase();
255-
href = `${section}${lowerAsset}${pageSuffix}${queryString}`;
256-
}
257-
}
258-
}
259-
260-
combinedLinks.push(`<a href="${href}">${displayText}</a>`);
261-
});
262-
};
263-
264-
linkify($systemTd.text());
265-
linkify($valueSetTd.text());
266-
267-
// Remove duplicates (based on text shown)
268-
const uniqueLinks = Array.from(
269-
new Map(combinedLinks.map(link => {
270-
const textMatch = link.match(/>(.*?)</);
271-
return textMatch ? [textMatch[1], link] : null;
272-
}).filter(Boolean))
273-
).map(pair => pair[1]);
274-
275-
$systemTd.html(uniqueLinks.join("<br>"));
276-
$valueSetTd.remove(); // cleanup 4th column
277-
});
278-
});
279-
</script>-->
280178

281179

282180

0 commit comments

Comments
 (0)