code
stringlengths
1
1.73M
language
stringclasses
1 value
class DrugsSuppliers < ActiveRecord::Migration def change create_table :drugs_suppliers, :id => false do |t| t.integer :drug_id t.integer :supplier_id end end end
Ruby
class CreatePayments < ActiveRecord::Migration def change create_table :payments do |t| t.integer :invoice_id t.float :amount t.float :change t.integer :payment_method_id t.integer :card_number t.integer :card_provider_id t.string :card_transaction_ref t.integer :cr...
Ruby
class CreateContacts < ActiveRecord::Migration def change create_table :contacts do |t| t.integer :contact_type_id t.text :address t.integer :postal_code t.string :phone t.string :fax t.integer :created_by t.integer :updated_by t.timestamps end end end
Ruby
class CreateRegistrationMethods < ActiveRecord::Migration def change create_table :registration_methods do |t| t.string :label t.integer :created_by t.integer :updated_by t.timestamps end end end
Ruby
class CreateStockLoggingCategories < ActiveRecord::Migration def change create_table :stock_logging_categories do |t| t.string :name t.integer :created_by t.integer :updated_by t.timestamps end end end
Ruby
class PatientsContacts < ActiveRecord::Migration def change create_table :contacts_patients, :id => false do |t| t.integer :patient_id t.integer :contact_id end end end
Ruby
class CreateStaffContacts < ActiveRecord::Migration def change create_table :staff_contacts do |t| t.integer :staff_id t.integer :contact_id t.integer :created_by t.integer :updated_by t.timestamps end end end
Ruby
class StaffsContacts < ActiveRecord::Migration def change create_table :contacts_staffs, :id => false do |t| t.integer :staff_id t.integer :contact_id end end end
Ruby
class CreatePatients < ActiveRecord::Migration def change create_table :patients do |t| t.string :first_name t.string :last_name t.date :dob t.string :mobile t.string :email t.integer :created_by t.integer :updated_by t.timestamps end end end
Ruby
class CreateDiagnoses < ActiveRecord::Migration def change create_table :diagnoses do |t| t.string :label t.integer :diagnosis_group_id t.integer :created_by t.integer :updated_by t.timestamps end end end
Ruby
class DrugsStockLoggings < ActiveRecord::Migration def change create_table :drugs_stock_loggings, :id => false do |t| t.integer :drug_id t.integer :stock_logging_id end end end
Ruby
class CreateDiagnosisGroups < ActiveRecord::Migration def change create_table :diagnosis_groups do |t| t.string :label t.integer :created_by t.integer :updated_by t.timestamps end end end
Ruby
class CreateStaffRoles < ActiveRecord::Migration def change create_table :staff_roles do |t| t.string :label t.string :code t.integer :created_by t.integer :updated_by t.timestamps end end end
Ruby
# This migration comes from fullcalendar_engine (originally 20131203105529) class CreateFullcalendarEngineEventSeries < ActiveRecord::Migration def change create_table :fullcalendar_engine_event_series do |t| t.integer :frequency, :default => 1 t.string :period, :default => 'monthly' t.datetime ...
Ruby
# This migration comes from fullcalendar_engine (originally 20131203105320) class CreateFullcalendarEngineEvents < ActiveRecord::Migration def change create_table :fullcalendar_engine_events do |t| t.string :title t.datetime :starttime, :endtime t.boolean :all_day, :default => false t.text...
Ruby
class CreateStocks < ActiveRecord::Migration def change create_table :stocks do |t| t.integer :drug_id t.integer :inventory_id t.float :quantity t.integer :created_by t.integer :updated_by t.timestamps end end end
Ruby
class CreateContactTypes < ActiveRecord::Migration def change create_table :contact_types do |t| t.string :label t.integer :created_by t.integer :updated_by t.timestamps end end end
Ruby
class CreateManufacturers < ActiveRecord::Migration def change create_table :manufacturers do |t| t.string :name t.string :code t.string :website t.text :address t.string :email t.string :phone t.string :fax t.integer :created_by t.integer :updated_by t...
Ruby
class CreateInvoices < ActiveRecord::Migration def change create_table :invoices do |t| t.string :code t.date :date t.float :total_fee t.float :total_discount t.integer :created_by t.integer :updated_by t.timestamps end end end
Ruby
class CreateCardProviders < ActiveRecord::Migration def change create_table :card_providers do |t| t.string :label t.integer :created_by t.integer :updated_by t.timestamps end end end
Ruby
ENV['RAILS_ENV'] ||= 'test' require File.expand_path('../../config/environment', __FILE__) require 'rails/test_help' class ActiveSupport::TestCase # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order. fixtures :all # Add more helper methods to be used by all tests here... end
Ruby
source 'https://rubygems.org' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' gem 'rails', '4.1.6' # Use sqlite3 as the database for Active Record # gem 'sqlite3' # Use mysql as the database for Active Record gem 'mysql', '~> 2.9.1' # Use SCSS for stylesheets gem 'sass-rails', '~> 4.0.3' # Use Uglifie...
Ruby
json.extract! @treatment_group, :id, :label, :created_at, :updated_at, :created_by, :updated_by, :created_at, :updated_at
Ruby
json.array!(@treatment_groups) do |treatment_group| json.extract! treatment_group, :id, :label, :created_at, :updated_at, :created_by, :updated_by json.url treatment_group_url(treatment_group, format: :json) end
Ruby
json.extract! @treatment, :id, :treatment_id, :appointment_id, :treatment_group_id, :fee, :created_at, :updated_at, :created_by, :updated_by, :created_at, :updated_at
Ruby
json.array!(@treatments) do |treatment| json.extract! treatment, :id, :treatment_id, :appointment_id, :treatment_group_id, :fee, :created_at, :updated_at, :created_by, :updated_by json.url treatment_url(treatment, format: :json) end
Ruby
json.extract! @patient, :id, :first_name, :last_name, :dob, :mobile, :email, :created_at, :updated_at, :created_by, :updated_by, :created_at, :updated_at
Ruby
json.array!(@patients) do |patient| json.extract! patient, :id, :first_name, :last_name, :dob, :mobile, :email, :created_at, :updated_at, :created_by, :updated_by json.url patient_url(patient, format: :json) end
Ruby
json.extract! @payment_method, :id, :label, :created_at, :updated_at, :created_by, :updated_by, :created_at, :updated_at
Ruby
json.array!(@payment_methods) do |payment_method| json.extract! payment_method, :id, :label, :created_at, :updated_at, :created_by, :updated_by json.url payment_method_url(payment_method, format: :json) end
Ruby
json.extract! @diagnosis_group, :id, :label, :created_at, :updated_at, :created_by, :updated_by, :created_at, :updated_at
Ruby
json.array!(@diagnosis_groups) do |diagnosis_group| json.extract! diagnosis_group, :id, :label, :created_at, :updated_at, :created_by, :updated_by json.url diagnosis_group_url(diagnosis_group, format: :json) end
Ruby
json.extract! @payment, :id, :invoice_id, :amount, :change, :payment_method_id, :card_number, :card_provider_id, :card_transaction_ref, :created_at, :updated_at, :created_by, :updated_by, :created_at, :updated_at
Ruby
json.array!(@payments) do |payment| json.extract! payment, :id, :invoice_id, :amount, :change, :payment_method_id, :card_number, :card_provider_id, :card_transaction_ref, :created_at, :updated_at, :created_by, :updated_by json.url payment_url(payment, format: :json) end
Ruby
json.extract! @stock_logging_category, :id, :name, :created_at, :updated_at, :created_by, :updated_by, :created_at, :updated_at
Ruby
json.array!(@stock_logging_categories) do |stock_logging_category| json.extract! stock_logging_category, :id, :name, :created_at, :updated_at, :created_by, :updated_by json.url stock_logging_category_url(stock_logging_category, format: :json) end
Ruby
json.extract! @contact, :id, :contact_type_id, :address, :postal_code, :phone, :fax, :created_at, :updated_at, :created_by, :updated_by, :created_at, :updated_at
Ruby
json.array!(@contacts) do |contact| json.extract! contact, :id, :contact_type_id, :address, :postal_code, :phone, :fax, :created_at, :updated_at, :created_by, :updated_by json.url contact_url(contact, format: :json) end
Ruby
json.extract! @contact_type, :id, :label, :created_at, :updated_at, :created_by, :updated_by, :created_at, :updated_at
Ruby
json.array!(@contact_types) do |contact_type| json.extract! contact_type, :id, :label, :created_at, :updated_at, :created_by, :updated_by json.url contact_type_url(contact_type, format: :json) end
Ruby
json.extract! @inventory, :id, :name, :description, :created_at, :updated_at, :created_by, :updated_by, :created_at, :updated_at
Ruby
json.array!(@inventories) do |inventory| json.extract! inventory, :id, :name, :description, :created_at, :updated_at, :created_by, :updated_by json.url inventory_url(inventory, format: :json) end
Ruby
json.extract! @staff, :id, :staff_role_id, :first_name, :last_name, :dob, :active, :created_at, :updated_at, :created_by, :updated_by, :created_at, :updated_at
Ruby
json.array!(@staffs) do |staff| json.extract! staff, :id, :staff_role_id, :first_name, :last_name, :dob, :active, :created_at, :updated_at, :created_by, :updated_by json.url staff_url(staff, format: :json) end
Ruby
json.extract! @diagnosis, :id, :label, :diagnosis_group_id, :created_at, :updated_at, :created_by, :updated_by, :created_at, :updated_at
Ruby
json.array!(@diagnoses) do |diagnosis| json.extract! diagnosis, :id, :label, :diagnosis_group_id, :created_at, :updated_at, :created_by, :updated_by json.url diagnosis_url(diagnosis, format: :json) end
Ruby
json.extract! @invoice_item_type, :id, :label, :created_at, :updated_at, :created_by, :updated_by, :created_at, :updated_at
Ruby
json.array!(@invoice_item_types) do |invoice_item_type| json.extract! invoice_item_type, :id, :label, :created_at, :updated_at, :created_by, :updated_by json.url invoice_item_type_url(invoice_item_type, format: :json) end
Ruby
json.extract! @stock, :id, :drug_id, :inventory_id, :quantity, :created_at, :updated_at, :created_by, :updated_by, :created_at, :updated_at
Ruby
json.array!(@stocks) do |stock| json.extract! stock, :id, :drug_id, :inventory_id, :quantity, :created_at, :updated_at, :created_by, :updated_by json.url stock_url(stock, format: :json) end
Ruby
json.extract! @appointment_status, :id, :label, :created_at, :updated_at, :created_by, :updated_by, :created_at, :updated_at
Ruby
json.array!(@appointment_statuses) do |appointment_status| json.extract! appointment_status, :id, :label, :created_at, :updated_at, :created_by, :updated_by json.url appointment_status_url(appointment_status, format: :json) end
Ruby
json.extract! @manufacturer, :id, :name, :code, :website, :address, :email, :phone, :fax, :created_at, :updated_at, :created_by, :updated_by, :created_at, :updated_at
Ruby
json.array!(@manufacturers) do |manufacturer| json.extract! manufacturer, :id, :name, :code, :website, :address, :email, :phone, :fax, :created_at, :updated_at, :created_by, :updated_by json.url manufacturer_url(manufacturer, format: :json) end
Ruby
json.extract! @stock_logging, :id, :stock_id, :quantity, :stock_logging_type, :stock_logging_category_id, :supplier_id, :created_at, :updated_at, :created_by, :updated_by, :created_at, :updated_at
Ruby
json.array!(@stock_loggings) do |stock_logging| json.extract! stock_logging, :id, :stock_id, :quantity, :stock_logging_type, :stock_logging_category_id, :supplier_id, :created_at, :updated_at, :created_by, :updated_by json.url stock_logging_url(stock_logging, format: :json) end
Ruby
json.extract! @invoice_detail, :id, :invoice_id, :invoice_item_id, :invoice_item_type_id, :fee, :discount, :created_at, :updated_at, :created_by, :updated_by, :created_at, :updated_at
Ruby
json.array!(@invoice_details) do |invoice_detail| json.extract! invoice_detail, :id, :invoice_id, :invoice_item_id, :invoice_item_type_id, :fee, :discount, :created_at, :updated_at, :created_by, :updated_by json.url invoice_detail_url(invoice_detail, format: :json) end
Ruby
json.extract! @invoice, :id, :code, :date, :total_fee, :total_discount, :created_at, :updated_at, :created_by, :updated_by, :created_at, :updated_at
Ruby
json.array!(@invoices) do |invoice| json.extract! invoice, :id, :code, :date, :total_fee, :total_discount, :created_at, :updated_at, :created_by, :updated_by json.url invoice_url(invoice, format: :json) end
Ruby
json.extract! @card_provider, :id, :label, :created_at, :updated_at, :created_by, :updated_by, :created_at, :updated_at
Ruby
json.array!(@card_providers) do |card_provider| json.extract! card_provider, :id, :label, :created_at, :updated_at, :created_by, :updated_by json.url card_provider_url(card_provider, format: :json) end
Ruby
json.extract! @appointment, :id, :patient_id, :staff_id, :date, :appointment_status_id, :registration_method_id, :created_at, :updated_at, :created_by, :updated_by, :created_at, :updated_at
Ruby
json.array!(@appointments) do |appointment| json.extract! appointment, :id, :patient_id, :staff_id, :date, :appointment_status_id, :registration_method_id, :created_at, :updated_at, :created_by, :updated_by json.url appointment_url(appointment, format: :json) end
Ruby
json.extract! @registration_method, :id, :label, :created_at, :updated_at, :created_by, :updated_by, :created_at, :updated_at
Ruby
json.array!(@registration_methods) do |registration_method| json.extract! registration_method, :id, :label, :created_at, :updated_at, :created_by, :updated_by json.url registration_method_url(registration_method, format: :json) end
Ruby
json.extract! @staff_role, :id, :label, :code, :created_at, :updated_at, :created_by, :updated_by, :created_at, :updated_at
Ruby
json.array!(@staff_roles) do |staff_role| json.extract! staff_role, :id, :label, :code, :created_at, :updated_at, :created_by, :updated_by json.url staff_role_url(staff_role, format: :json) end
Ruby
json.extract! @supplier, :id, :name, :code, :website, :address, :email, :phone, :fax, :created_at, :updated_at, :created_by, :updated_by, :created_at, :updated_at
Ruby
json.array!(@suppliers) do |supplier| json.extract! supplier, :id, :name, :code, :website, :address, :email, :phone, :fax, :created_at, :updated_at, :created_by, :updated_by json.url supplier_url(supplier, format: :json) end
Ruby
json.extract! @drug, :id, :manufacture_id, :code, :name, :price_per_item, :description, :created_at, :updated_at, :created_by, :updated_by, :created_at, :updated_at
Ruby
json.array!(@drugs) do |drug| json.extract! drug, :id, :manufacture_id, :code, :name, :price_per_item, :description, :created_at, :updated_at, :created_by, :updated_by json.url drug_url(drug, format: :json) end
Ruby
json.extract! @prescription, :id, :drug_id, :appointment_id, :stock_logging_id, :dosage, :quantity, :fee, :note, :created_at, :updated_at, :created_by, :updated_by, :created_at, :updated_at
Ruby
json.array!(@prescriptions) do |prescription| json.extract! prescription, :id, :drug_id, :appointment_id, :stock_logging_id, :dosage, :quantity, :fee, :note, :created_at, :updated_at, :created_by, :updated_by json.url prescription_url(prescription, format: :json) end
Ruby
module CalendarHelper def calendar(date = Date.today, &block) Calendar.new(self, date, block).table end end
Ruby
module WelcomeHelper end
Ruby
module ApplicationHelper end
Ruby
module AppointmentsHelper end
Ruby
module InventoriesHelper end
Ruby
module TreatmentsHelper end
Ruby
module PaymentMethodsHelper end
Ruby
module StaffsHelper end
Ruby
module RegistrationMethodsHelper end
Ruby
module InvoiceItemTypesHelper end
Ruby
module CardProvidersHelper end
Ruby
module DrugsHelper end
Ruby
module StaffRolesHelper end
Ruby
module StockLoggingsHelper end
Ruby
module ManufacturersHelper end
Ruby
module PaymentsHelper end
Ruby
module ContactsHelper end
Ruby
module TreatmentGroupsHelper end
Ruby
module StockLoggingCategoriesHelper end
Ruby
module InvoicesHelper end
Ruby
module StocksHelper end
Ruby
module PatientsHelper end
Ruby
module DiagnosisGroupsHelper end
Ruby
module DiagnosesHelper end
Ruby
module AppointmentStatusesHelper end
Ruby
module InvoiceDetailsHelper end
Ruby