Skip to content

Commit

Permalink
minor typos and doc fixes
Browse files Browse the repository at this point in the history
Update modules/redcap/README.md

Update modules/redcap/README.md

Update modules/redcap/README.md

Update modules/redcap/php/configurations/redcapconfiguration.class.inc

Update modules/redcap/php/models/redcapinstrument.class.inc

Update modules/redcap/php/configurations/redcapconfiguration.class.inc

Update modules/redcap/php/configurations/redcapconfigurationinstance.class.inc

Update modules/redcap/php/endpoints/notifications.class.inc
  • Loading branch information
maximemulder committed Dec 18, 2024
1 parent 402f459 commit 28f3733
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 9 deletions.
6 changes: 3 additions & 3 deletions modules/redcap/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ As such, **clearly defining event/visit and record/PSCID for studies is crucial
### REDCap Instrument State

REDCap DET notification `${instrument_backend_name}_complete` property defines the state of a REDCap instrument.
It can only be one of the following trhree states:
It can only be one of the following three states:

- 0 = not complete.
- 1 = unverified.
Expand All @@ -96,8 +96,8 @@ Only instruments defined there can be imported. **All others will be ignored**.

### LORIS Instrument State

be To importable, LORIS version of REDCap instrument must:
To be importable, the LORIS version of a REDCap instrument must:
- have a associated instrument file.
- have a database definition i.e. in test_names, session, test_battery tables.
- have a started visit, with a populated battery.
- have a visit that correspond to REDCap event name.
- have a visit that corresponds to a REDCap event name.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class RedcapConfiguration
/**
* A list of REDCap instances.
*
* @var RedcapConfigurationInstance[]
* @var array<string, RedcapConfigurationInstance> The list of instance-specific REDCap configurations, indexed by instance name.
*/
private array $_instances;

Expand Down Expand Up @@ -136,11 +136,11 @@ class RedcapConfiguration
*/
public function hasInstanceName(string $instanceName): bool
{
return !is_null($this->getInstanceByName($instanceName));
return array_key_exists($instanceName, $this->_instances);
}

/**
* Add a REDCap proejct to a REDCap instance.
* Add a REDCap project to a REDCap instance.
*
* @param string $instanceName a REDCap instance name
* @param string $projectID a REDCap project ID
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class RedcapConfigurationInstance
/**
* A list of projects accessible on this REDCap instance.
*
* @var RedcapConfigurationProject[]
* @var array<string, RedcapConfigurationProject> The list of project-specific REDCap configurations, indexed by project ID.
*/
private array $_projects;

Expand Down
2 changes: 1 addition & 1 deletion modules/redcap/php/endpoints/notifications.class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class Notifications extends Endpoint
{
$db = $this->loris->getDatabaseConnection();

// Try url-endoded first
// Try url-encoded first
$data = $request->getParsedBody();
if (empty($data)) {
// Fallback to application/json
Expand Down
1 change: 0 additions & 1 deletion modules/redcap/php/models/redcapinstrument.class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ use LORIS\redcap\models\RedcapProp;
*/
class RedcapInstrument extends RedcapProp
{

/**
* Redcap instrument num.
*
Expand Down

0 comments on commit 28f3733

Please sign in to comment.