-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #77 from tranpl/master
implement new api methods and bug fixes
- Loading branch information
Showing
13 changed files
with
711 additions
and
416 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
"Variable / Field Name","Form Name","Section Header","Field Type","Field Label","Choices, Calculations, OR Slider Labels","Field Note","Text Validation Type OR Show Slider Number","Text Validation Min","Text Validation Max",Identifier?,"Branching Logic (Show field only if...)","Required Field?","Custom Alignment","Question Number (surveys only)","Matrix Group Name","Matrix Ranking?","Field Annotation" | ||
record_id,demographics,,text,"Study Id",,,,,,,,,,,,, | ||
first_name,demographics,"Contact Information",text,"First Name",,,,,,y,,,,,,, | ||
last_name,demographics,,text,"Last Name",,,,,,y,,,,,,, | ||
address,demographics,,notes,"Street, City, State, ZIP",,,,,,y,,,,,,, | ||
email,demographics,,text,E-mail,,,email,,,y,,,,,,, | ||
dob,demographics,,text,"Date of Birth",,,date_ymd,,,y,,,,,,, | ||
file_upload,demographics,,file,"File Upload",,,,,,,,,,,,, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,55 @@ | ||
namespace Redcap.Models | ||
using Newtonsoft.Json; | ||
|
||
namespace Redcap.Models | ||
{ | ||
/// <summary> | ||
/// Event for redcap longitudinal projects. | ||
/// Event for redcap longitudinal projects and repeating instruments/forms. | ||
/// </summary> | ||
public class RedcapEvent | ||
{ | ||
/// Name of the Event | ||
/// This is required. | ||
/// The unique name of the redcap event, usually appended with arm_1 after event name. | ||
/// e.g "event_1_arm_1" | ||
[JsonProperty("event_name")] | ||
[JsonRequired] | ||
public string EventName { get; set; } | ||
/// <summary> | ||
/// Name of the event | ||
/// </summary> | ||
public string event_name { get; set; } | ||
/// <summary> | ||
/// Arm the event belongs to | ||
/// Arm the event belongs to, if any | ||
/// </summary> | ||
public string arm_num { get; set; } | ||
/// | ||
[JsonProperty("arm_num")] | ||
public string ArmNumber { get; set; } | ||
/// <summary> | ||
/// Days of offset | ||
/// Days of offset, if any | ||
/// </summary> | ||
public string day_offset { get; set; } | ||
/// | ||
[JsonProperty("day_offset")] | ||
public string DayOffset { get; set; } | ||
/// <summary> | ||
/// Minimum(floor) of offset | ||
/// Minimum(floor) of offset, if any | ||
/// </summary> | ||
public string offset_min { get; set; } | ||
/// | ||
[JsonProperty("offset_min")] | ||
public string MinimumOffset { get; set; } | ||
/// <summary> | ||
/// Max(ceiling) of offset | ||
/// Max(ceiling) of offset, if any | ||
/// </summary> | ||
public string offset_max { get; set; } | ||
/// | ||
[JsonProperty("offset_max")] | ||
public string MaximumOffset { get; set; } | ||
/// <summary> | ||
/// Unique event name used to identify this event | ||
/// Unique event name used to identify this event, if any | ||
/// </summary> | ||
public string unique_event_name { get; set; } | ||
/// | ||
[JsonProperty("unique_event_name")] | ||
public string UniqueEventName { get; set; } | ||
/// <summary> | ||
/// Label displayed for this event | ||
/// Label displayed for this event, if any | ||
/// </summary> | ||
public object custom_event_label { get; set; } | ||
/// | ||
[JsonProperty("custom_event_label")] | ||
public object CustomEventLabel { get; set; } | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using Newtonsoft.Json; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace Redcap.Models | ||
{ | ||
/// <summary> | ||
/// A single repeat instance in redcap | ||
/// </summary> | ||
public class RedcapRepeatInstance | ||
{ | ||
/// <summary> | ||
/// The instance number that the instrument is repeated, e.g 3, repeated on the 3rd instance | ||
/// </summary> | ||
[JsonProperty("redcap_repeat_instance")] | ||
public int RepeatInstance { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using Newtonsoft.Json; | ||
|
||
namespace Redcap.Models | ||
{ | ||
/// <summary> | ||
/// Redcap Repeat Instrument | ||
/// The instrument that is repeated in a project that has repeating instruments enabled. | ||
/// This can support "repeat entire event" or "repeat instruments" mode. | ||
/// </summary> | ||
public class RedcapRepeatInstrument: RedcapEvent | ||
{ | ||
|
||
/// <summary> | ||
/// The unique instrument/form name that is repeated for the specific event. | ||
/// e.g demographics | ||
/// </summary> | ||
[JsonProperty("form_name")] | ||
public string FormName { get; set; } | ||
|
||
/// <summary> | ||
/// The custom form/instrument label for this repeating instrument or event. | ||
/// </summary> | ||
[JsonProperty("custom_form_label")] | ||
public string CustomFormLabel { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,53 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<TargetFramework>netstandard2.0</TargetFramework> | ||
<Authors>Michael Tran</Authors> | ||
<Company>Virginia Commonwealth University</Company> | ||
<GeneratePackageOnBuild>True</GeneratePackageOnBuild> | ||
<RepositoryUrl>https://github.com/cctrbic/redcap-api</RepositoryUrl> | ||
<PackageProjectUrl>https://github.com/cctrbic/redcap-api</PackageProjectUrl> | ||
<Description>This library allows applications on the .NET platform to make http calls to REDCap instances.</Description> | ||
<Product>Redcap Api Library</Product> | ||
<PackageId>RedcapAPI</PackageId> | ||
<Version>1.0.6</Version> | ||
<AssemblyVersion>1.0.6.0</AssemblyVersion> | ||
<PackageTags>redcap api library</PackageTags> | ||
<PackageReleaseNotes>quality of life changes for methods | ||
updated documents | ||
bug fixes</PackageReleaseNotes> | ||
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance> | ||
<ApplicationIcon /> | ||
<OutputType>Library</OutputType> | ||
<StartupObject /> | ||
<NeutralLanguage>en</NeutralLanguage> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> | ||
<Optimize>false</Optimize> | ||
<DocumentationFile>bin\Debug\netcoreapp2.0\Redcap.xml</DocumentationFile> | ||
<DebugType>portable</DebugType> | ||
<DebugSymbols>true</DebugSymbols> | ||
<PlatformTarget>AnyCPU</PlatformTarget> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> | ||
<DocumentationFile>bin\Release\netcoreapp1.1\Redcap.xml</DocumentationFile> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Compile Remove="bin\**" /> | ||
<EmbeddedResource Remove="bin\**" /> | ||
<None Remove="bin\**" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" /> | ||
<PackageReference Include="Serilog" Version="2.7.1" /> | ||
<PackageReference Include="System.ComponentModel.Annotations" Version="4.5.0" /> | ||
<PackageReference Include="System.ValueTuple" Version="4.5.0" /> | ||
<PackageReference Include="xunit.extensibility.core" Version="2.4.0" /> | ||
<Content Include="Models\RedcapMetaData.cs" /> | ||
<Content Include="Models\RecordStatus.cs" /> | ||
</ItemGroup> | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<TargetFramework>netstandard2.0</TargetFramework> | ||
<Authors>Michael Tran</Authors> | ||
<Company>Virginia Commonwealth University</Company> | ||
<GeneratePackageOnBuild>True</GeneratePackageOnBuild> | ||
<RepositoryUrl>https://github.com/cctrbic/redcap-api</RepositoryUrl> | ||
<PackageProjectUrl>https://github.com/cctrbic/redcap-api</PackageProjectUrl> | ||
<Description>This library allows applications on the .NET platform to make http calls to REDCap instances.</Description> | ||
<Product>Redcap Api Library</Product> | ||
<PackageId>RedcapAPI</PackageId> | ||
<Version>1.0.7</Version> | ||
<AssemblyVersion>1.0.7.0</AssemblyVersion> | ||
<PackageTags>redcap api library</PackageTags> | ||
<PackageReleaseNotes>Additional tests for latest release. | ||
Additional methods include: ImportRepeatingInstrumentsAndEvents | ||
Older APIs have been deprecated(you can still use them but they'll generate warnings). | ||
Bug fixes</PackageReleaseNotes> | ||
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance> | ||
<ApplicationIcon /> | ||
<OutputType>Library</OutputType> | ||
<StartupObject /> | ||
<NeutralLanguage>en</NeutralLanguage> | ||
<FileVersion>1.0.7.0</FileVersion> | ||
<PackageLicenseUrl>https://github.com/cctrbic/redcap-api/blob/master/LICENSE.md</PackageLicenseUrl> | ||
<Copyright>https://github.com/cctrbic/redcap-api/blob/master/LICENSE.md</Copyright> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> | ||
<Optimize>false</Optimize> | ||
<DocumentationFile>bin\Debug\netcoreapp2.0\Redcap.xml</DocumentationFile> | ||
<DebugType>portable</DebugType> | ||
<DebugSymbols>true</DebugSymbols> | ||
<PlatformTarget>AnyCPU</PlatformTarget> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> | ||
<DocumentationFile>bin\Release\netcoreapp1.1\Redcap.xml</DocumentationFile> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Compile Remove="bin\**" /> | ||
<EmbeddedResource Remove="bin\**" /> | ||
<None Remove="bin\**" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" /> | ||
<PackageReference Include="Serilog" Version="2.7.1" /> | ||
<PackageReference Include="System.ComponentModel.Annotations" Version="4.5.0" /> | ||
<PackageReference Include="System.ValueTuple" Version="4.5.0" /> | ||
<PackageReference Include="xunit.extensibility.core" Version="2.4.0" /> | ||
<Content Include="Models\RedcapMetaData.cs" /> | ||
<Content Include="Models\RecordStatus.cs" /> | ||
</ItemGroup> | ||
</Project> |
Oops, something went wrong.