Skip to content

Commit

Permalink
Merge pull request #229 from Saxos-Simone/master
Browse files Browse the repository at this point in the history
Fix Boolean (BL) XML-specific data type representation
  • Loading branch information
grahamegrieve authored Jan 31, 2024
2 parents 45c7b89 + d1b172d commit bbd0e5c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
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

0 comments on commit bbd0e5c

Please sign in to comment.