<commit_before><!--This is the page where field workers can add new patients-->

{% load static from staticfiles %}
<!DOCTYPE html>
<html>

<head>
<title>Register new patient | Ultra-Remote-Medicine</title>

<link rel="stylesheet" type="text/css" href="{% static "headerStyle.css" %}" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <!-- Bootstrap -->
  <link type="text/css" rel="stylesheet" href="{% static "bootstrap/css/bootstrap.css"%}"/>
  <link type="text/css" rel="stylesheet" href="{% static "bootstrap/css/bootstrap.min.css"%}"/>
  <script src="http://code.jquery.com/jquery.js"></script>
  <script src="{% static "bootstrap/js/bootstrap.min.js"%}"></script>

  <style>
  label,input{
    display: inline-block;
    vertical-align: baseline;
    width: 140px;

}

label {
    color: #2D2D2D;
    font-size: 15px;
}

form, input {
    box-sizing: border-box;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;

}

form {
    width: 300px;
}
</style>
</head>

<body>

	{% include "_topBar.html" %}

	<div class="pageCentered">

		<div class="profilecontainer">

			<h1><b>Register New Patient</b></h1>
			<form name="myForm" action="new_patient" method="post" enctype="multipart/form-data"> {% csrf_token %}

				<label for="firstname">First Name: </label> {{form.first_name}} <br>
				<label for="lastname">Last Name: </label> {{form.last_name}} <br>
				<label for="sex">Sex: </label> {{form.sex}} <br>
				<label for="dateofbirth">Date of Birth:(DD/MM/YY) </label> {{form.date_of_birth}} <br>
				<label for="regionalhealthid">Regional Health ID: </label> {{form.health_id}} <br>
				<label for="gps">GPS Coordinates:</label> {{form.gps_coordinates}} <br>
				<label for="address">Address: </label> {{form.address}} <br>
				<label for="phonenumber">Phone Number:</label> {{form.phone_number}} <br>
				<label for="email">E-Mail: </label> {{form.email}} <br>
				<label for="photo">Patient picture: </label> {{form.patient_pic}} <br>
				
				<input onclick="validateForm()" type="submit" value="Submit" />
				<p id="warning"></p>
			</form>

		</div>
	</div>

</body>

<script>

function validateForm()
{
var a=document.forms["myForm"]["{{form.first_name.auto_id}}"].value;
var b=document.forms["myForm"]["{{form.last_name.auto_id}}"].value;
var c=document.forms["myForm"]["{{form.date_of_birth.auto_id}}"].value;
if (a==null || a=="")
  {
  if (b==null || b=="")
  {<commit_msg>Corrected incorrect date format indicator on newPatient page.<commit_after><!--This is the page where field workers can add new patients-->

{% load static from staticfiles %}
<!DOCTYPE html>
<html>

<head>
<title>Register new patient | Ultra-Remote-Medicine</title>

<link rel="stylesheet" type="text/css" href="{% static "headerStyle.css" %}" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <!-- Bootstrap -->
  <link type="text/css" rel="stylesheet" href="{% static "bootstrap/css/bootstrap.css"%}"/>
  <link type="text/css" rel="stylesheet" href="{% static "bootstrap/css/bootstrap.min.css"%}"/>
  <script src="http://code.jquery.com/jquery.js"></script>
  <script src="{% static "bootstrap/js/bootstrap.min.js"%}"></script>

  <style>
  label,input{
    display: inline-block;
    vertical-align: baseline;
    width: 140px;

}

label {
    color: #2D2D2D;
    font-size: 15px;
}

form, input {
    box-sizing: border-box;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;

}

form {
    width: 300px;
}
</style>
</head>

<body>

	{% include "_topBar.html" %}

	<div class="pageCentered">

		<div class="profilecontainer">

			<h1><b>Register New Patient</b></h1>
			<form name="myForm" action="new_patient" method="post" enctype="multipart/form-data"> {% csrf_token %}

				<label for="firstname">First Name: </label> {{form.first_name}} <br>
				<label for="lastname">Last Name: </label> {{form.last_name}} <br>
				<label for="sex">Sex: </label> {{form.sex}} <br>
				<label for="dateofbirth">Date of Birth:(MM/DD/YY) </label> {{form.date_of_birth}} <br>
				<label for="regionalhealthid">Regional Health ID: </label> {{form.health_id}} <br>
				<label for="gps">GPS Coordinates:</label> {{form.gps_coordinates}} <br>
				<label for="address">Address: </label> {{form.address}} <br>
				<label for="phonenumber">Phone Number:</label> {{form.phone_number}} <br>
				<label for="email">E-Mail: </label> {{form.email}} <br>
				<label for="photo">Patient picture: </label> {{form.patient_pic}} <br>
				
				<input onclick="validateForm()" type="submit" value="Submit" />
				<p id="warning"></p>
			</form>

		</div>
	</div>

</body>

<script>

function validateForm()
{
var a=document.forms["myForm"]["{{form.first_name.auto_id}}"].value;
var b=document.forms["myForm"]["{{form.last_name.auto_id}}"].value;
var c=document.forms["myForm"]["{{form.date_of_birth.auto_id}}"].value;
if (a==null || a=="")
  {
  if (b==null || b=="")
  {
{'fraction_non_alphanumeric': 0.2140827922077922, 'fraction_numerical': 0.006087662337662338, 'mean_word_length': 4.470588235294118, 'pattern_counts': {'":': 0, '<': 131, '<?xml version=': 0, '>': 131, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '502807', 'n_tokens_mistral': 1920, 'n_tokens_neox': 1759, 'n_words': 359}