From cc0642b3bdfa03e7fdc3a4701a0450f01094e7fc Mon Sep 17 00:00:00 2001 From: Simone Perini Date: Fri, 26 Jan 2024 11:47:06 +0100 Subject: [PATCH 1/2] Fix Boolean (BL) XML-specific data type representation --- library/cda/cda_base.pas | 2 +- library/cda/cda_writer.pas | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/library/cda/cda_base.pas b/library/cda/cda_base.pas index 78e653e39..865bd81bc 100644 --- a/library/cda/cda_base.pas +++ b/library/cda/cda_base.pas @@ -734,7 +734,7 @@ constructor Tv3PropertyDefinition.CreateBoolean(oOwner: Tv3Base; bIsStructural : FCollectionState := rmpctNone; FIsStructural := bIsStructural; if bHasValue Then - FValueString := BoolToStr(bValue); + FValueString := BoolToStr(bValue, true).ToLower; end; diff --git a/library/cda/cda_writer.pas b/library/cda/cda_writer.pas index f9d3260bb..beee9fc83 100644 --- a/library/cda/cda_writer.pas +++ b/library/cda/cda_writer.pas @@ -316,7 +316,7 @@ procedure TCDAWriter.WriteCDA(oXml: TXmlBuilder; oDoc: TcdaClinicalDocument); WriteComments(oXml, oDT); WriteANYAttributes(sPath, oXml, oDT); if oDT.HasValue Then - Attribute(sPath, oXml, 'value', BoolToStr(oDT.value), true); + Attribute(sPath, oXml, 'value', BoolToStr(oDT.value, true).ToLower, true); oDT.sourcelocation := oXml.Tag(sName); End; @@ -349,7 +349,7 @@ procedure TCDAWriter.WriteCDA(oXml: TXmlBuilder; oDoc: TcdaClinicalDocument); Attribute(sPath, oXml, 'extension', oDT.extension, true); Attribute(sPath, oXml, 'assigningAuthorityName', oDT.identifierName, true); if oDT.hasDisplayable Then - Attribute(sPath, oXml, 'displayable', BoolToStr(oDT.displayable), true); + Attribute(sPath, oXml, 'displayable', BoolToStr(oDT.displayable, true).ToLower, true); Attribute(sPath, oXml, 'scope', CODES_Tv3IdentifierScope[oDT.scope], true); Attribute(sPath, oXml, 'reliability', CODES_Tv3IdentifierReliability[oDT.reliability], true); oDT.sourcelocation := oXml.Tag(sName); From d1b172d642114be73faf4f49bb177b9023fe7790 Mon Sep 17 00:00:00 2001 From: Simone Perini Date: Mon, 29 Jan 2024 11:49:05 +0100 Subject: [PATCH 2/2] Fix TCDAWriter.WriteANYAttributes: 'nullFlavor' --- library/cda/cda_writer.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/cda/cda_writer.pas b/library/cda/cda_writer.pas index beee9fc83..538345641 100644 --- a/library/cda/cda_writer.pas +++ b/library/cda/cda_writer.pas @@ -301,7 +301,7 @@ procedure TCDAWriter.WriteCDA(oXml: TXmlBuilder; oDoc: TcdaClinicalDocument); Procedure TCDAWriter.WriteANYAttributes(Const sPath: string; oXml : TXmlBuilder; oDT : Tv3ANY); Begin - Attribute(sPath, oXml, 'nullFLavor', writeNullFlavor(sPath, oDt.NullFlavor), true); + Attribute(sPath, oXml, 'nullFlavor', writeNullFlavor(sPath, oDt.NullFlavor), true); // ignore updateMode and flavorId for now End;