Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Boolean (BL) XML-specific data type representation #229

Merged
merged 6 commits into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion library/cda/cda_base.pas
Original file line number Diff line number Diff line change
Expand Up @@ -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;


Expand Down
6 changes: 3 additions & 3 deletions library/cda/cda_writer.pas
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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;

Expand Down Expand Up @@ -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);
Expand Down