Skip to content

Commit b3a9d65

Browse files
authored
Merge pull request #28 from tranpl/master
impliment apis and more tests
2 parents d5d8102 + bfcbeea commit b3a9d65

16 files changed

+1045
-253
lines changed

RedcapApi/Api/Redcap.cs

Lines changed: 579 additions & 137 deletions
Large diffs are not rendered by default.

RedcapApi/Interfaces/IRedcap.cs

Lines changed: 257 additions & 91 deletions
Large diffs are not rendered by default.

RedcapApi/Models/Override.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
11
namespace Redcap.Models
22
{
3+
/// <summary>
4+
/// Used to erase existing arms in the project or only add new ones
5+
/// </summary>
36
public enum Override
47
{
8+
/// <summary>
9+
/// true — You may use override=1 as a 'delete all + import' action in order to erase all existing Arms in the project while importing new Arms.
10+
/// </summary>
511
True = 1,
12+
/// <summary>
13+
/// false [default] If override=0, then you can only add new Arms or rename existing ones.
14+
/// </summary>
615
False = 0
716
}
817
}

RedcapApi/Models/OverwriteBehavior.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,13 @@
66
/// </summary>
77
public enum OverwriteBehavior
88
{
9+
/// <summary>
10+
/// blank/empty values will be ignored [default]
11+
/// </summary>
912
normal = 0,
13+
/// <summary>
14+
/// blank/empty values are valid and will overwrite data
15+
/// </summary>
1016
overwrite = 1
1117
}
1218
}

RedcapApi/Models/Record.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,14 @@
44

55
namespace Redcap.Models
66
{
7+
/// <summary>
8+
/// A record should contain a set of key/value pair.
9+
/// </summary>
710
public class Record
811
{
12+
/// <summary>
13+
/// A record value contains a key and its associated value.
14+
/// </summary>
915
public KeyValuePair<string, string> Value { get; set; }
1016
}
1117
}

RedcapApi/Models/RedcapArm.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
11
namespace Redcap.Models
22
{
3+
/// <summary>
4+
/// Arms are only available for longitudinal projects.
5+
/// </summary>
36
public class RedcapArm
47
{
8+
/// <summary>
9+
/// Number associated with the event, e.g "1"
10+
/// </summary>
511
public string arm_num { get; set; }
12+
/// <summary>
13+
/// Name of the event. e.g "event1_arm_1"
14+
/// </summary>
615
public string name { get; set; }
716
}
817
}

RedcapApi/Models/RedcapConfigurations.cs

Lines changed: 0 additions & 14 deletions
This file was deleted.

RedcapApi/Models/RedcapDataType.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,21 @@
99
/// </summary>
1010
public enum RedcapDataType
1111
{
12+
/// <summary>
13+
/// output as one record per row [default]
14+
/// </summary>
1215
flat = 0,
16+
/// <summary>
17+
/// input as one data point per row
18+
/// </summary>
1319
eav = 1,
20+
/// <summary>
21+
/// EAV: Non-longitudinal: Will have the fields - record*, field_name, value
22+
/// </summary>
1423
nonlongitudinal = 2,
24+
/// <summary>
25+
/// EAV: Longitudinal: Will have the fields - record*, field_name, value, redcap_event_name
26+
/// </summary>
1527
longitudinal = 3
1628
}
1729
}

RedcapApi/Models/RedcapFormat.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,17 @@
88
/// </summary>
99
public enum InputFormat
1010
{
11+
/// <summary>
12+
/// Default Javascript Notation
13+
/// </summary>
1114
json = 0,
15+
/// <summary>
16+
/// Comma Seperated Values
17+
/// </summary>
1218
csv = 1,
19+
/// <summary>
20+
/// Extensible Markup Language
21+
/// </summary>
1322
xml = 2
1423
}
1524
}

RedcapApi/Models/ReturnContent.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,13 @@
77
/// </summary>
88
public enum ReturnContent
99
{
10+
/// <summary>
11+
/// ids - a list of all record IDs that were imported
12+
/// </summary>
1013
ids = 0,
14+
/// <summary>
15+
/// count [default] - the number of records imported
16+
/// </summary>
1117
count = 1
1218
}
1319
}

0 commit comments

Comments
 (0)