"type": "string",
"format": "date"
},
+ "time": {
+ "description": "Time of Admission",
+ "type": "string",
+ "format": "time"
+ },
+ "vp": {
+ "description": "Visiting Physician",
+ "type": "string"
+ },
"ward": {
"description": "Ward",
"type": "string"
},
"summary": {
"description": "Summary",
- "type": "string"
+ "type": "string",
+ "format": "textarea"
}
},
"required": ["pid", "name", "age", "sex", "date"]
},
"cc": {
"description": "Chief complaint",
- "type": "string"
+ "type": "string",
+ "format": "textarea"
},
"history": {
"description": "History",
- "type": "string"
+ "type": "string",
+ "format": "textarea"
},
"comorb": {
"description": "Comorbidities",
},
"oe": {
"description": "General Examination",
- "type": "string"
+ "type": "string",
+ "format": "textarea"
},
"bp": {
"description": "Blood Pressure",
}
$form=$form."</select>";
}
+ elseif(isSet($prop->format) && $prop->format=="textarea"){
+ $form=$form."<textarea class='form-control' name='".$field."' id='".$field."'>".$value."</textarea>";
+ }
elseif($field=="pid"){
- $form=$form."<input class='form-control' ".$lockpid." ".$req." type='".$type."' name='".$field."' id='".$field."' ".$value.">";
+ $form=$form."<input class='form-control' ".$lockpid." ".$req." type='".$type."' step='any' name='".$field."' id='".$field."' ".$value.">";
}
else{
- $form=$form."<input class='form-control' ".$req." type='".$type."' name='".$field."' id='".$field."' ".$value.">";
+ $form=$form."<input class='form-control' ".$req." type='".$type."' step='any' name='".$field."' id='".$field."' ".$value.">";
}
$form=$form."</div>";
}
- $form=$form."<div><label class='form-label' for='extra-note'>Notes</label><textarea class='form-control' name='extra-note' id='extra-note'></textarea></div>";
+ $form=$form."<div><label class='form-label' for='extra-note'>Extra Notes</label><textarea class='form-control' name='extra-note' id='extra-note'></textarea></div>";
$form=$form."<button class='btn btn-primary mt-3' type='submit'>Save</button>";
$form=$form."</form>";
return $form;
if(!empty($schema->properties->$field)){
$view=$view."<tr><td>".$schema->properties->$field->description."</td><td>".$value."</td></tr>";
}
+ elseif($field=="extra-note"){
+ $view=$view."<tr><td>Extra Notes</td><td>".$value."</td></tr>";
+ }
else{
$view=$view."<tr><td>".$field."</td><td>".$value."</td></tr>";
}
<div class="card-body">
<h4 class="card-title">Add New Report</h4>
<?php echo $form;?>
- <p class="text-right"><a href="attachments.php?pid=<?php echo $pid;?>&req=<?php echo $_GET["req"];?>">Upload PDF instead</p>
+ <?php if(!empty($_GET["req"])){echo "<p class='text-right'><a href='attachments.php?pid=".$pid."&req=".$_GET["req"]."'>Upload PDF instead</a></p>";}?>
</div>
</div>
</div>