/****************************************************************************************
Function/Procedure  Name            :- fnValidateMandatoryFieldsOnSavePrescriptionFavorite
functionality                       :- Function to Check Mandatory Fields on Saving Doctor Prescription Favorite
****************************************************************************************/

var gE = function(id) { return document.getElementById(id); }

function fnValidateMandatoryFieldsOnSavePrescriptionFavorite() {
   
    /*Enter the Prescription Name*/
    if (gE("ctl00_CP_PrescriptionNameTextBox").value == "") {
        SetMessageBox(MessageVars.HED_000018, 'Error');
        return false;
    }
    else {
        ResetMessageBox();
    }

    /*Enter the Prescription Description*/
    if (gE("ctl00_CP_PrescriptionDescriptionTextBox").value == "") {
        SetMessageBox(MessageVars.HED_000019, 'Error');
        return false;
    }
    else {
        ResetMessageBox();
    }  


    return true;
}


/****************************************************************************************
Function/Procedure  Name            :- fnValidateMandatoryFieldsOnModifyPrescriptionFavorite
functionality                       :- Function to Check Mandatory Fields of Drug Details of Doctor Prescription Favorite
****************************************************************************************/

var gE = function(id) { return document.getElementById(id); }

function fnValidateMandatoryFieldsOfDrugDetails() {
     
    /*Enter the Drug Code*/
    if (gE("ctl00_CP_DrugCodeTextBox").value == "") {
        SetMessageBox(MessageVars.HED_000011, 'Error');
        return false;
    }
    else {
        ResetMessageBox();
    }

    /*Enter the Dosage*/
    if (gE("ctl00_CP_DosageTextBox").value == "") {
        SetMessageBox(MessageVars.HED_000012, 'Error');
        return false;
    }
    else {
        ResetMessageBox();
    }

    /*Enter the Frequency*/
    if (gE("ctl00_CP_FrequencyTextBox").value == "") {
        SetMessageBox(MessageVars.HED_000013, 'Error');
        return false;
    }
    else {
        ResetMessageBox();
    }

    /*Enter the Duration*/
    if (gE("ctl00_CP_DurationTextBox").value == "") {
        SetMessageBox(MessageVars.HED_000014, 'Error');
        return false;
    }
    else {
        ResetMessageBox();
    }

    /*Enter the Instruction*/
    if (gE("ctl00_CP_InstructionTextBox").value == "") {
        SetMessageBox(MessageVars.HED_000015, 'Error');
        return false;
    }
    else {
        ResetMessageBox();
    }

    /*Enter the Instruction*/
    if (gE("ctl00_CP_CautionaryTextBox").value == "") {
        SetMessageBox(MessageVars.HED_000016, 'Error');
        return false;
    }
    else {
        ResetMessageBox();
    }    
   
    return true;
}


/****************************************************************************************
Function/Procedure  Name            :- fnValidateMandatoryFieldsOnSaveServiceFavorite
functionality                       :- Function to Check Mandatory Fields on Saving Doctor Service Favorite
****************************************************************************************/

var gE = function(id) { return document.getElementById(id); }

function fnValidateMandatoryFieldsOnSaveServiceFavorite() {


    /*Enter the Diagnostic Name*/
    if (gE("ctl00_CP_DiagnosticNameTextBox").value == "") {
        SetMessageBox(MessageVars.HED_000006, 'Error');
        return false;
    }
    else {
        ResetMessageBox();
    }

    /*Enter the Diagnostic Description*/
    if (gE("ctl00_CP_DiagnosticDescriptionTextBox").value == "") {
        SetMessageBox(MessageVars.HED_000007, 'Error');
        return false;
    }
    else {
        ResetMessageBox();
    }

    /*Enter the Test Code*/
    if (gE("ctl00_CP_TestCodeTextBox").value == "") {
        SetMessageBox(MessageVars.HED_000005, 'Error');
        return false;
    }
    else {
        ResetMessageBox();
    }

    return true;
}

/****************************************************************************************
Function/Procedure  Name            :- fnValidateMandatoryFieldsOnModifyServiceFavorite
functionality                       :- Function to Check Mandatory Fields on Modifying Doctor Service Favorite
****************************************************************************************/

var gE = function(id) { return document.getElementById(id); }

function fnValidateMandatoryFieldsOnModifyServiceFavorite() {
  
    /*Enter the Diagnostic Name*/
    if (gE("ctl00_CP_DiagnosticNameTextBox").value == "") {
        SetMessageBox(MessageVars.HED_000006, 'Error');
        return false;
    }
    else {
        ResetMessageBox();
    }

    /*Enter the Diagnostic Description*/
    if (gE("ctl00_CP_DiagnosticDescriptionTextBox").value == "") {
        SetMessageBox(MessageVars.HED_000007, 'Error');
        return false;
    }
    else {
        ResetMessageBox();
    }
 
    return true;
}


/****************************************************************************************
Function/Procedure  Name            :- fnValidateMandatoryFieldsOfInvestigationalDetails
functionality                       :- Function to Check Mandatory Fields of Investigational Details of Doctor Service Favorite
****************************************************************************************/

var gE = function(id) { return document.getElementById(id); }

function fnValidateMandatoryFieldsOfInvestigationalDetails() {

    /*Enter the Test Code*/
    if (gE("ctl00_CP_TestCodeTextBox").value == "") {
        SetMessageBox(MessageVars.HED_000005, 'Error');
        return false;
    }
    else {
        ResetMessageBox();
    }


    return true;
}


