예제 #1
0
function getParticipantInfo($pGUID)
{
    $d = loadParticipants();
    foreach ($d as $key => $ds) {
        if ($ds['pGUID'] == $pGUID) {
            return $ds;
        }
    }
}
예제 #2
0
    }
    if ($found) {
        logmsg("Save participants with changed event receiv DICOM for RadReview user.\nData: " . json_encode($_POST));
        saveParticipants($p);
    } else {
        logmsg("Warning: received event but nothing was saved.\nData:  " . json_encode($_POST));
    }
} elseif ($action == "reviewed") {
    $score = "unknown";
    if (isset($_POST['score'])) {
        $score = $_POST['score'];
    } else {
        logmsg("Error: Reviewed event without a score.");
    }
    // create an event that alerts the user that image data has been reviewed, shows the resulting 'score'
    $p = loadParticipants();
    // add an event for this pGUID
    $found = false;
    $entry = array();
    foreach ($p as &$pa) {
        if ($pa['pGUID'] == $pGUID) {
            $entry = array("eventType" => "DICOM reviewed", "eventNotes" => "score: " . $score . "<br>" . $_POST['other_notes'], "username" => "RadReview <span class=\"label label-info\">" . $score . "</span>", "date" => date(DATE_ATOM), "serverdate" => date(DATE_ATOM), "payload" => $_POST);
            $pa['events'][] = $entry;
            $found = true;
            break;
        }
    }
    if ($found) {
        logmsg("Save participants with reviewed event and score: " . $score . ".\nData: " . json_encode($_POST));
        saveParticipants($p);
    } else {