@mycure/vu-doctor
v0.2.1
Published
Doctor module
Downloads
2
Readme
MYCURE Vue Doctor module
Installation and Usage
$ yarn add @mycure/vu-doctor
- use as a vue plugin
import Vue from 'vue';
import { firebaseApp } from './firebase';
import McDoctor from '@mycure/vu-doctor';
Vue.use(McDoctor, { firebaseApp })
- above will do the ff:
- describe side effects here
- sample side effects:
- attach a global method/attribute
- attach an instance method/attribute
- add components
// create sample use here
API
getWebsiteDetailsOfDoctorWithURL(url: string): Promise<DoctorWebsite>
getWebsiteDetailsOfDoctorWithUid(uid: string): Promise<DoctorWebsite>
searchDoctor(searchString: string): Observable<Doctor[]>
Model
Common
interface Country {
alpha2: string;
name: string;
}
interface Address {
lat: number;
lng: number;
country: Country;
}
Doctor
enum Sex {
male
female
}
enum Practitioner {
physician
}
interface Name {
firstName: string;
middleName: string;
lastName: string;
suffix: string;
title: string;
}
interface Profession {
description: string;
suffix: string;
}
interface Education {
degree: string;
school: string;
from: string;
to: string;
}
interface Doctor {
uid: string;
sex: Sex;
PTRNumber: string;
email: string;
thumbURL: string;
picURL: string;
name: Name;
HMO: string[];
affiliations: string[];
PRCLicence: string;
practicingSince: string;
practitionerType: Practitioner;
professions: Profession[];
specializations: string[];
education: Education[];
facilities: Facility[];
}
interface DoctorWebsite extends Doctor {
bg: string;
shortDescription: string;
url: string;
bio: string;
}
Facility
interface FacilitySocialMedia {
facebook: string;
linkedin: string;
twitter: string;
}
interface FacilityContact {
email: string[];
phone: string[];
socialMedia: FacilitySocialMedia;
}
interface FacilitySchedule {
day: string; // day of the week
close: timestamp;
open: timestamp;
}
interface Facility {
coverPicURL: string;
picURL: string;
description: string;
name: string;
address: Address;
contacts: FacilityContact;
schedules: FacilitySchedule[];
}