Skip to content

Commit

Permalink
new folders
Browse files Browse the repository at this point in the history
  • Loading branch information
jibrel committed Aug 29, 2024
1 parent 7f43253 commit 01ea42d
Show file tree
Hide file tree
Showing 20 changed files with 602 additions and 0 deletions.
Binary file modified .DS_Store
Binary file not shown.
152 changes: 152 additions & 0 deletions paper1.2/exam1c.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>MRCOG Part 3 Exam UI</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/marked/2.1.3/marked.min.js"></script>
<style>
body {
font-family: Arial, sans-serif;
max-width: 800px;
margin: 0 auto;
padding: 20px;
}
#timer {
position: fixed;
top: 0;
left: 0;
right: 0;
background-color: #f8f9fa;
font-size: 24px;
font-weight: bold;
padding: 10px;
text-align: center;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
z-index: 1000;
}
#exam-content {
margin-top: 60px;
}
#task-title, #task-content, #notes {
margin-bottom: 20px;
}
button {
padding: 10px 20px;
font-size: 16px;
}
#task-content {
border: 1px solid #ccc;
padding: 15px;
background-color: #f9f9f9;
}
#notes {
width: 100%;
height: 150px;
resize: vertical;
}
</style>
</head>
<body>
<div id="timer"></div>
<div id="exam-content">
<h1>MRCOG Part 3 Exam UI</h1>
<div id="start-screen">
<button id="start-btn">Start Exam</button>
</div>
<div id="exam-screen" style="display: none;">
<div id="task-title"></div>
<div id="task-content"></div>
<textarea id="notes" placeholder="Type your notes here..."></textarea>
</div>
</div>

<script>
const startBtn = document.getElementById('start-btn');
const startScreen = document.getElementById('start-screen');
const examScreen = document.getElementById('exam-screen');
const timerDisplay = document.getElementById('timer');
const taskTitleDisplay = document.getElementById('task-title');
const taskContentDisplay = document.getElementById('task-content');
const notesArea = document.getElementById('notes');

let tasks = [];
let currentTask = 0;
let timer;
let timeLeft;

startBtn.addEventListener('click', startExam);

function loadTasks() {
return fetch('mrcog-exam-tasks.json')
.then(response => response.json())
.then(data => {
tasks = data.tasks;
})
.catch(error => console.error('Error loading tasks:', error));
}

function startExam() {
loadTasks().then(() => {
startScreen.style.display = 'none';
examScreen.style.display = 'block';
nextTask();
});
}

function startTimer(seconds, label) {
clearInterval(timer);
timeLeft = seconds;
updateTimerDisplay(label);

timer = setInterval(() => {
timeLeft--;
updateTimerDisplay(label);

if (timeLeft <= 0) {
clearInterval(timer);
if (label === 'Reading Time') {
startTimer(600, 'Task Time');
} else {
nextTask();
}
}
}, 1000);
}

function updateTimerDisplay(label) {
const minutes = Math.floor(timeLeft / 60);
const seconds = timeLeft % 60;
timerDisplay.textContent = `${label}: ${minutes}:${seconds.toString().padStart(2, '0')}`;
}

function showTask() {
const task = tasks[currentTask];
taskTitleDisplay.textContent = task.title;

fetch(task.file)
.then(response => response.text())
.then(markdown => {
taskContentDisplay.innerHTML = marked.parse(markdown);
})
.catch(error => console.error('Error loading task content:', error));

notesArea.value = ''; // Clear notes for new task
}

function nextTask() {
if (currentTask < tasks.length) {
showTask();
startTimer(120, 'Reading Time');
} else {
endExam();
}
currentTask++;
}

function endExam() {
examScreen.innerHTML = '<h2>Exam Completed</h2><p>Thank you for taking the MRCOG Part 3 Exam.</p>';
}
</script>
</body>
</html>
46 changes: 46 additions & 0 deletions paper1.2/exam1e.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Examiner UI</title>
<style>
body, html {
margin: 0;
padding: 0;
height: 100%;
width: 100%;
font-family: Arial, sans-serif;
}
.container {
display: flex;
flex-direction: column;
height: 100%;
}
h1 {
text-align: center;
padding: 20px;
margin: 0;
background-color: #f0f0f0;
}
.form-container {
flex: 1;
display: flex;
justify-content: center;
align-items: center;
padding: 20px;
}
iframe {
border: none;
}
</style>
</head>
<body>
<div class="container">
<h1>Examiner UI</h1>
<div class="form-container">
<iframe src="https://docs.google.com/forms/d/e/1FAIpQLSfanB0hUfTwzs00s27lQFTmN8uhy-FFER15ih6Y0_rQtibJLQ/viewform?embedded=true" width="640" height="7589" frameborder="0" marginheight="0" marginwidth="0">Loading…</iframe>
</div>
</div>
</body>
</html>
103 changes: 103 additions & 0 deletions paper1.2/exam1r.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>MRCOG Part 3 Exam UI</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/marked/2.0.3/marked.min.js"></script>
<style>
body {
font-family: Arial, sans-serif;
max-width: 800px;
margin: 0 auto;
padding: 20px;
}
#case-number {
font-size: 24px;
font-weight: bold;
text-align: center;
margin-bottom: 20px;
}
#case-content {
border: 1px solid #ccc;
padding: 20px;
margin-bottom: 20px;
}
.navigation {
display: flex;
justify-content: space-between;
}
button {
font-size: 18px;
padding: 10px 20px;
cursor: pointer;
}
</style>
</head>
<body>
<div id="case-number"></div>
<div id="case-content"></div>
<div class="navigation">
<button id="prev-btn">&larr; Previous</button>
<button id="next-btn">Next &rarr;</button>
</div>

<script>
let cases = [];
let currentCase = 0;

// Load exam data from external JSON file
fetch('exam_data.json')
.then(response => response.json())
.then(data => {
cases = data.cases;
loadMarkdownContent();
})
.catch(error => console.error('Error loading exam data:', error));

function loadMarkdownContent() {
const loadPromises = cases.map(caseData =>
fetch(caseData.contentFile)
.then(response => response.text())
.then(content => {
caseData.content = content;
})
);

Promise.all(loadPromises).then(() => {
updateCase();
});
}

function updateCase() {
document.getElementById('case-number').textContent = `Case ${cases[currentCase].number} of ${cases.length}`;
document.getElementById('case-content').innerHTML = marked(cases[currentCase].content);
}

function nextCase() {
if (currentCase < cases.length - 1) {
currentCase++;
updateCase();
}
}

function prevCase() {
if (currentCase > 0) {
currentCase--;
updateCase();
}
}

document.getElementById('next-btn').addEventListener('click', nextCase);
document.getElementById('prev-btn').addEventListener('click', prevCase);

document.addEventListener('keydown', (event) => {
if (event.key === 'ArrowRight') {
nextCase();
} else if (event.key === 'ArrowLeft') {
prevCase();
}
});
</script>
</body>
</html>
33 changes: 33 additions & 0 deletions paper1.2/exam_data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"cases": [
{
"number": 1,
"contentFile": "mock1/case1.md"
},
{
"number": 2,
"contentFile": "mock1/case2.md"
},
{
"number": 3,
"contentFile": "mock1/case3.md"
},
{
"number": 4,
"contentFile": "mock1/case4.md"
},
{
"number": 5,
"contentFile": "mock1/case5.md"
},
{
"number": 6,
"contentFile": "mock1/case6.md"
},
{
"number": 7,
"contentFile": "mock1/case7.md"
}

]
}
9 changes: 9 additions & 0 deletions paper1.2/mock1/case1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Station 1: Obstetric Emergency

You are called to the labor ward to assess a 28-year-old woman who is 38 weeks pregnant and has sudden onset of severe abdominal pain.

## Task
- Take a focused history
- Perform a targeted examination
- Formulate a differential diagnosis
- Propose an initial management plan
9 changes: 9 additions & 0 deletions paper1.2/mock1/case2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Station 2: Gyn Emergency

You are called to the labor ward to assess a 28-year-old woman who is 38 weeks pregnant and has sudden onset of severe abdominal pain.

## Task
- Take a focused history
- Perform a targeted examination
- Formulate a differential diagnosis
- Propose an initial management plan
10 changes: 10 additions & 0 deletions paper1.2/mock1/case3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Station 1: Obstetric Emergency

You are called to the labor ward to assess a 28-year-old woman who is 38 weeks pregnant and has sudden onset of severe abdominal pain.

## Task
- Take a focused history
- Perform a targeted examination
- Formulate a differential diagnosis
- Propose an initial management plan

10 changes: 10 additions & 0 deletions paper1.2/mock1/case4.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Station 1: Obstetric Emergency

You are called to the labor ward to assess a 28-year-old woman who is 38 weeks pregnant and has sudden onset of severe abdominal pain.

## Task
- Take a focused history
- Perform a targeted examination
- Formulate a differential diagnosis
- Propose an initial management plan

10 changes: 10 additions & 0 deletions paper1.2/mock1/case5.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

# Station 1: Obstetric Emergency

You are called to the labor ward to assess a 28-year-old woman who is 38 weeks pregnant and has sudden onset of severe abdominal pain.

## Task
- Take a focused history
- Perform a targeted examination
- Formulate a differential diagnosis
- Propose an initial management plan
Loading

0 comments on commit 01ea42d

Please sign in to comment.