From 96a339bedf673daaeaf8e393d1ff8f47f07ad3e6 Mon Sep 17 00:00:00 2001 From: Gerry Campion Date: Mon, 16 Oct 2023 18:19:10 -0400 Subject: [PATCH] Much simpler rule template --- public/rule_template.yml | 45 +++++++++++++++++++++++++++++++++++++ src/services/DataService.ts | 8 +++---- 2 files changed, 49 insertions(+), 4 deletions(-) create mode 100644 public/rule_template.yml diff --git a/public/rule_template.yml b/public/rule_template.yml new file mode 100644 index 0000000..b727da9 --- /dev/null +++ b/public/rule_template.yml @@ -0,0 +1,45 @@ +Authorities: + - Organization: '' + Standards: + - Name: '' + References: + - Citations: + - Cited Guidance: '' + Document: '' + Item: '' + Section: '' + Criteria: + Logical Expression: + Condition: '' + Rule: '' + Plain Language Expression: '' + Type: '' + Origin: '' + Release Notes: '' + Rule Identifier: + Id: '' + Version: '' + Validator Rule Message: '' + Version: '' + Version: '' +Check: + all: + - operator: '' + name: '' + value: '' +Core: + Status: Draft + Version: '1' +Description: '' +Executability: Fully Executable +Outcome: + Message: '' +Rule Type: Record Data +Scope: + Classes: + Include: + - ALL + Domains: + Include: + - ALL +Sensitivity: Record diff --git a/src/services/DataService.ts b/src/services/DataService.ts index aca8607..7ef049f 100644 --- a/src/services/DataService.ts +++ b/src/services/DataService.ts @@ -213,10 +213,10 @@ export class DataService { }; public get_rule_template = async (): Promise => { - const schema = (await this.get_rules_schema()).find( - (schema) => schema.standard === "base" - ).json; - return new RuleTemplate(schema).schemaToTemplate(); + const template = await fetch("/rule_template.yml").then((res) => + res.text() + ); + return template; }; public execute_rule = async (payload: {