Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en-US">
- <meta charset="UTF-8">
- <head>
- <title>Medical Form</title>
- <link rel="stylesheet" type="text/css" href="RegoForm.css">
- </head>
- <body>
- <form action="link to where it needs to go" method="post" name="medicalform" onsubmit="return validate();">
- <fieldset>
- <legend>Personal information:</legend>
- Title:
- <label for="mr">Mr.</label>
- <input type="radio" name="title" id="mr" value="mr" onclick="titleRadioChanged(this)">
- <label for="mrs">Mrs.</label>
- <input type="radio" name="title" id="mrs" value="mrs" onclick="titleRadioChanged(this)">
- <label for="miss">Miss</label>
- <input type="radio" name="title" id="miss" value="miss" onclick="titleRadioChanged(this)">
- <label for="ms">Ms.</label>
- <input type="radio" name="title" id="ms" value="ms" onclick="titleRadioChanged(this)">
- <label for="other">Other:</label>
- <input type="radio" name="title" id="other" value="other" onclick="titleRadioChanged(this)">
- <input type="text" name="title" id="titleinputtext" disabled>
- <hr>
- Surname: <input type="text" name="surname"><hr>
- Given Name(s) in Full:<input type="text" name="givennames"><hr>
- Previous Surname(s) (if applicable): <input type="text" name="previoussurname"><hr>
- Date of Birth: <input type="date" name="dob" min="1900-01-01"><hr>
- Sex: <label for="male">Male</label>
- <input type="radio" id="male" name="sex" value="male">
- <label for="female">Female</label>
- <input type="radio" id="female" name="sex" value="female"><hr>
- Country of Birth: <input type="text" name="cob"><br>
- If Australia, what state:<input type="text" name="sob">
- <hr>
- Marital Status:
- <pre>
- <label for="married">Married</label><input type="radio" name="marital" id="married" value="married"> <label for="seperated">Seperated</label><input type="radio" id="seperated" name="marital" value="seperated">
- <label for="single">Single</label><input type="radio" name="marital" id="single" value="single"> <label for="defacto">De Facto</label><input type="radio" id="defacto" name="marital" value="defacto">
- <label for="widowed">Widowed</label><input type="radio" name="marital" id="widowed" value="widowed"> <label for="divorced">Divorced</label><input type="radio" id="divorced" name="marital" value="divorced">
- </pre>
- <hr>
- Do you wish to be visited by a Church Representative?
- <label for="churchyes">Yes</label> <input type="radio" id="churchyes" name="church" value="churchyes">
- <label for="churchno">No</label><input type="radio" id="churchno" name="church" value="churchno">
- <hr>
- Aboriginal/Torres Straight Islander: <label for="minorityyes">Yes<input type="radio" id="minorityyes" name="minority" value="minority">
- <label for="minorityno">No<input type="radio" id="minorityno" name="minority" value="minorityno">
- <hr>
- Address: <input type="text" name="address">
- <hr>
- Postcode: <input type="text" name="postcode">
- <hr>
- Phone No: Home <input type="text" name="homenum">
- Mobile <input type="text" name="mobilenum">
- <br>
- </fieldset>
- <br>
- <fieldset>
- <h2> Next of Kin / Contact Person </h2>
- <hr>
- Name: <input type="text" name="nokname">
- <hr>
- Address: <input type="text" name="nokaddress">
- <hr>
- Home No. : <input type="text" name="nokhomenum">
- <hr>
- Mobile No. : <input type="text" name="nokmobilenum">
- <hr>
- Relationship to Patient: <input type="text" name="nokrelationship">
- <hr>
- Medicare No:<input type="text" name="medicarenum">
- Card ID No:<input type="text" name="medicareidnum">
- Expiry Date:<input type="date" name="medicareexpiry">
- </fieldset>
- <br>
- <fieldset>
- <h2> Other Details </h2>
- Name of your GP: <input type="text" name="gpname">
- <hr>
- Have you been a patient in this Hospital or had pathology/x-rays done here?
- <br>
- <label for="expatientyes">Yes<input type="radio" id="expatientyes" name="expatient" value="expatientyes">
- <br>
- <label for="expatientno">No<input type="radio" id="expatientno" name="expatient" value="expatientno">
- <hr>
- Do you have private health insurance? <br>
- <label for="insuranceyes">Yes<input type="radio" id="insuranceyes" name="insurance" value="insuranceyes">
- <br>
- <label for="insuranceno">No<input type="radio" id="insuranceno" name="insurance" value="insuranceno">
- </fieldset>
- <br>
- <fieldset>
- <h2>Health Insurance Details</h2>
- Name of Fund: <input type="text" name="insurancename"> <hr>
- Membership No: <input type="text" name="insurancenum"> <hr>
- Level of Insurance:
- <pre>
- <label for="insuranceleveltop">Top<input type="radio" id="insuranceleveltop" name="insurancelevel" value="insuranceleveltop"><label for="insurancelevelintermediate">Intermediate<input type="radio" id="insurancelevelintermediate" name="insurancelevel" value="insurancelevelintermediate">
- <label for="insurancelevelbasic">Basic<input type="radio" id="insurancelevelbasic" name="insurancelevel" value="insurancelevelbasic"> <label for="insurancelevelextrasonly">Extras Only<input type="radio" id="insurancelevelextrasonly" name="insurancelevel" value="insurancelevelextrasonly">
- </pre>
- <hr>
- Does an excess apply? <br>
- <label for="excessyes">Yes<input type="radio" id="excessyes"name="excess" value="excessyes" onclick="excessRadioChanged(this)"> <br>
- <label for="excessno">No<input type="radio" id="excessno" name="excess" value="excessno" onclick="excessRadioChanged(this)"> <br>
- Excess amount ($): <input type="text" id="excessinputtext" name="excessamount" disabled>
- </fieldset>
- <br>
- <fieldset>
- <h2> WorkCare / TAC / Workers Comp. </h2>
- <br>
- Approval must be obtained prior to admission. Correspondence verifying liability must be presented on admission. <hr>
- Date of Injury/Accident: <input type="date" name="injurydate"> <hr>
- Phone No.: <input type="text" name="workcarenum"> <hr>
- Insurance Company: <input type="text" name="insurancecompany"> <hr>
- Claim No: <input type="text" name="claimnum"> <hr>
- Your solicitor: <input type="text" name="solicitor"> <hr>
- Address: <input type="text" name="workcareaddress"> <hr>
- Phone No.: <input type="text" name="solicitorphone"> <hr>
- If WorkCare / Workers Comp. : <br>
- <label for="iscare">WorkCare <input type="radio" id="iscare" name="workcareorcomp" value="iscare"> <br>
- <label for="iscomp">Workers Comp. <input type="radio" id="iscomp" name="workcareorcomp" value="iscomp"> <hr>
- Employer: <input type="text" name="employer"><br>
- Address: <input type="text" name="employeraddress"> <hr>
- <br>
- <br>
- </fieldset>
- <br>
- <br>
- <input type="submit" value="Submit" id="submit" onfocus="myFunction()">
- <br>
- <hr>
- <footer>
- <h4> Private Insurance </h4>
- If you elect to be a private patient, the Hospital will claim bed fees on your behalf. Please bring your membership book at time of admission.
- </footer>
- </form>
- <script src="script.js"></script>
- <script>
- yeahbaby();
- </script>
- </body>
- </html>
- and here is my javascript file (please ignore the shitty code underneath the yeahbaby(); function hahaha)
- function yeahbaby() {
- document.getElementsByName("surname")[0].setAttribute("maxLength", "40");
- }
- function validate(){
- if(document.medicalform.title.value == "")
- {
- alert("Please choose your preferred title.");
- return false;
- }
- else{
- if(document.medicalform.surname.value == "")
- {
- alert("Please enter surname");
- return false;
- }
- else{
- if(document.medicalform.givennames.value == "")
- {
- alert("Please enter given name");
- return false;
- }
- else{
- if(document.medicalform.dob.value == "")
- {
- alert("Please enter your date of birth");
- return false;
- }
- else{
- if(document.medicalform.address.value == "")
- {
- alert("Please enter your address");
- return false;
- }
- else{
- if(document.medicalform.postcode.value == "")
- {
- alert("Please enter your postcode");
- return false;
- }
- else{
- if(document.medicalform.homenum.value == "" && document.medicalform.mobilenum.value == "")
- {
- alert("Please enter at least one phone number");
- return false;
- }
- else{
- if(document.medicalform.medicarenum.value == "")
- {
- alert("Please enter your medicare number");
- return false;
- }
- else{
- if(document.medicalform.medicareidnum.value == "")
- {
- alert("Please enter your medicare card number");
- return false;
- }
- else{
- if(document.medicalform.medicareexpiry.value == "")
- {
- alert("Please enter medicare card expiry date");
- return false;
- }
- else{
- if(document.medicalform.insurancename.value == "")
- {
- alert("Please enter your insurance company's name");
- return false;
- }
- else{
- if(document.medicalform.insurancenum.value == "")
- {
- alert("Please enter your insurance number");
- return false;
- }
- else{
- if(document.medicalform.insurancecompany.value == "")
- {
- alert("Please enter please enter your insurance company (idk)");
- return false;
- }
- else{
- if(document.medicalform.claimnum.value == "")
- {
- alert("Please enter your claim number");
- return false;
- }
- else{
- return true;
- }
- }}}}}}}}}}}}}}
- function excessRadioChanged(element) {
- document.getElementById('excessinputtext').disabled = element.value != 'excessyes';}
- function titleRadioChanged(element) {
- document.getElementById('titleinputtext').disabled = element.value != 'other';}
Add Comment
Please, Sign In to add comment