Code Monkey home page Code Monkey logo

testwork's Introduction

testwork

Answers the questions in "Test work backend" part.

There is a little test sample (PatientControllerTest). This is functional test making request to /patient/ page and expecting to receive 200 status code.

Most of the times I used FOSUserBundle for registration and authentication. It's pretty good when standard registration is required, it's also pretty easy to customize. I have experience in creating Symfony based authentication mechanism from scratch also.

Answers to "OUR QUESTIONS PART"

How would you build a reference?

I would rely on doctrine ORM in this. After describing of the entity it's easy to generate sql migration using DoctrineMigrationsBundle

For the doctor entity I would use doctrine ManyToMany. In database layer it would be a separate table having columns id, patient_id, doctor_id

For invoice I assume that each invoice should have patient_id (The person who has to pay for services). So in Patient doctrine entity we have OneToMany relation with Invoice entity to get collection of invoices and in Invoice entity we have ManyToOne relation to get single Patient entity (owner of this Invoice). In database it will be table of invoices with patient_id column in it

How to set up application

Here we have pretty standard symfony based application. I use Vagrant for development, so please install it. Ansible (tool for provision) should also be installed

Once you've installed Vargrant and Ansible please clone project to which ever directory you like. After that call command "vagrant up" in your terminal

It will take a while for the first time, because vagrant will donwload box and run Ansible

It work fine with Ubuntu 14.04, Vagrant 1.8.6, ansible 2.3.0.0

Install composer dependencies. To achieve this please run "composer install"

Ssh to your box using command "vagrant ssh"

Being inside vagrant box run "php bin/console doctrine:migrations:migrate" to run migrations

Being inside vagrant box run "php bin/console doctrine:fixtures:load" to load fixture data

Application is ready for usage and available in browser by http://192.168.33.10 . Routes are defined via annotations inside PatientController

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.