Skip to content

Commit

Permalink
Merge pull request #13 from PharmCat/dev
Browse files Browse the repository at this point in the history
v0.5.1
  • Loading branch information
PharmCat authored Feb 10, 2023
2 parents b0c2287 + 1a02ac4 commit 2a55721
Show file tree
Hide file tree
Showing 8 changed files with 628 additions and 114 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "ODMXMLTools"
uuid = "2456a17b-6ca2-4f51-9342-f0287e829718"
authors = ["PharmCat <[email protected]>"]
version = "0.5.0"
version = "0.5.1"

[deps]

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ODMXMLTools.jl is a simple tool set for working with ODM-XML.

| Version | pkgeval | Cover | Build | Docs |
|--------|-------|-------|-------|------|
|[![version](https://juliahub.com/docs/ODMXMLTools/version.svg)](https://docs.juliahub.com/ODMXMLTools/stbAr)|[![pkgeval](https://juliahub.com/docs/ODMXMLTools/pkgeval.svg)](https://docs.juliahub.com/ODMXMLTools/stbAr)|[![codecov](https://codecov.io/gh/PharmCat/ODMXMLTools.jl/branch/main/graph/badge.svg?token=3DksoMcfzh)](https://codecov.io/gh/PharmCat/ODMXMLTools.jl)|[![Tier 1](https://github.com/PharmCat/ODMXMLTools.jl/workflows/Tier%201/badge.svg) | [![Latest docs](https://img.shields.io/badge/docs-latest-blue.svg)](https://pharmcat.github.io/ODMXMLTools.jl/dev/) [![Stable docs](https://img.shields.io/badge/docs-stable-blue.svg)](https://pharmcat.github.io/ODMXMLTools.jl/stable/)|
|[![version](https://juliahub.com/docs/ODMXMLTools/version.svg)](https://docs.juliahub.com/ODMXMLTools/stbAr)|[![pkgeval](https://juliahub.com/docs/ODMXMLTools/pkgeval.svg)](https://docs.juliahub.com/ODMXMLTools/stbAr)|[![codecov](https://codecov.io/gh/PharmCat/ODMXMLTools.jl/branch/main/graph/badge.svg?token=3DksoMcfzh)](https://codecov.io/gh/PharmCat/ODMXMLTools.jl)| [![Tier 1](https://github.com/PharmCat/ODMXMLTools.jl/actions/workflows/Tier1.yml/badge.svg)](https://github.com/PharmCat/ODMXMLTools.jl/actions/workflows/Tier1.yml) | [![Latest docs](https://img.shields.io/badge/docs-latest-blue.svg)](https://pharmcat.github.io/ODMXMLTools.jl/dev/) [![Stable docs](https://img.shields.io/badge/docs-stable-blue.svg)](https://pharmcat.github.io/ODMXMLTools.jl/stable/)|

[ODM-XML](https://www.cdisc.org/standards/data-exchange/odm) is a vendor-neutral, platform-independent format for exchanging and archiving clinical and translational research data, along with their associated metadata, administrative data, reference data, and audit information. ODM-XML facilitates the regulatory-compliant acquisition, archival and exchange of metadata and data. It has become the language of choice for representing case report form content in many electronic data capture (EDC) tools.

Expand Down
14 changes: 14 additions & 0 deletions src/ODMXMLTools.jl
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,20 @@ module ODMXMLTools
:Symbol => [:TranslatedText],
)

const SPLSTRATTRS = Set([:Repeating
:IsReferenceData
:Mandatory
:DataType
:Type
:UserType
:LocationType
:Methodology
:TransactionType
:EditPoint
:UsedImputationMethod
:Comparator
:SoftHard])

include("odmxml.jl")
include("checknode.jl")
include("spss.jl")
Expand Down
367 changes: 273 additions & 94 deletions src/checknode.jl

Large diffs are not rendered by default.

333 changes: 321 additions & 12 deletions src/nodeinfo.jl

Large diffs are not rendered by default.

19 changes: 16 additions & 3 deletions test/nvtest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,20 @@
<ItemRef ItemOID="I_3" OrderNumber="3" Mandatory="Yes" />
</ItemGroupDef>
<ItemDef OID="I_1" Name="SAD" DataType="integer" Length="3" SASFieldName="SAD" Comment="Systolic BP"></ItemDef>
<ItemDef OID="I_2" Name="DAD" DataType="integer" Length="3" SASFieldName="DAD" Comment="Diastolic BP"></ItemDef>
<ItemDef OID="I_2" Name="DAD" DataType="integer" Length="3" SASFieldName="DAD" Comment="Diastolic BP">
<RangeCheck Comparator = "GT" SoftHard = "Soft">
<CheckValue>10</CheckValue>
<ErrorMessage>
<TranslatedText>Error value GT</TranslatedText>
</ErrorMessage>
</RangeCheck>
<RangeCheck Comparator = "LT" SoftHard = "Soft">
<CheckValue>300</CheckValue>
<ErrorMessage>
<TranslatedText>Error value LT</TranslatedText>
</ErrorMessage>
</RangeCheck>
</ItemDef>
<ItemDef OID="I_3" Name="HR" DataType="integer" Length="3" SASFieldName="HR" Comment="Heart rate"></ItemDef>
</MetaDataVersion>
</Study>
Expand Down Expand Up @@ -136,7 +149,7 @@
<FormData FormOID="FORM_VD_1">
<ItemGroupData ItemGroupOID="VIT_IG_1">
<ItemDataInteger ItemOID="I_1">x120</ItemDataInteger>
<ItemDataInteger ItemOID="I_2">80</ItemDataInteger>
<ItemDataInteger ItemOID="I_2">800</ItemDataInteger>
<ItemDataInteger ItemOID="I_3">63</ItemDataInteger>
</ItemGroupData>
</FormData>
Expand All @@ -155,7 +168,7 @@
<FormData FormOID="FORM_VD_1">
<ItemGroupData ItemGroupOID="VIT_IG_1">
<ItemData ItemOID="I_1" Value="121"/>
<ItemData ItemOID="I_2" Value="79"/>
<ItemData ItemOID="I_2" Value="790"/>
<ItemData ItemOID="I_3" Value="62"/>
</ItemGroupData>
</FormData>
Expand Down
4 changes: 2 additions & 2 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,9 @@ using Test
odmt = ODMXMLTools.importxml(joinpath(dirname(@__FILE__), "nvtest.xml"))
mdbt = ODMXMLTools.buildmetadata(odmt, "ST_1_1", "mdv_1")
vodm = ODMXMLTools.validateodm(odmt)
@test length(vodm) == 6
@test length(vodm) == 7
cdv = ODMXMLTools.checkdatavalues(odmt)
@test length(cdv) == 1
@test length(cdv) == 3



Expand Down
1 change: 0 additions & 1 deletion test/test.xml
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,6 @@
<FirstName>FirstName</FirstName>
<LastName>LastName</LastName>
<Organization>Organization</Organization>
<Organization>Organization</Organization>
<Address>
<StreetName>StreetName</StreetName>
<City>City</City>
Expand Down

2 comments on commit 2a55721

@PharmCat
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/77462

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.5.1 -m "<description of version>" 2a55721f23eab9f34f02fb682617e60d88f48d04
git push origin v0.5.1

Please sign in to comment.