#!/bin/bash
#

fns="api/outpatients/create_outpatient.php
	api/outpatients/create_treatment.php
       	api/outpatients/get_treatment.php
       	api/outpatients/get_treatments_by_opd.php
	api/outpatients/helper.php
	api/outpatients/update_outpatient.php
	api/outpatients/update_treatment.php
	api/tools/upgrade_treatments_formula_id.php
	api/user_management/_lib.php
	css/outpatients.css
	js/dashboard.js
	js/outpatients.js"


for fn in $fns
do
	orgFn=/var/www/html/clinic/$fn
	newFn=/var/www/html/sample/$fn

	echo -e "\e[1mFN: $fn\e[0m"
	if [ ! -f $orgFn ]; then
		echo -e "\e[31mNo such org file - $orgFn\e[0m"
		[ -f $newFn ] && cat $newFn > $orgFn
	elif [ ! -f $newFn ]; then
		echo -e "\e[31mNo such new file - $newFn\e[0m"
		continue
	fi

	diff $orgFn $newFn|vim -

done

