-
Notifications
You must be signed in to change notification settings - Fork 5
/
angular-contacts.html
165 lines (144 loc) · 4.69 KB
/
angular-contacts.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
---
title: Contacts module
keywords: sample
summary: "Contacts module"
sidebar: angular_sidebar
permalink: angular-contacts.html
folder: angular/core-tiles
filename: angular-contacts.html
---
<h4><a href="https://github.com/PulseTile/PulseTile/blob/master/src/app/pulsetileui/pages/contacts/contacts-list.component.js">Contacts List</a></h4>
{% include image.html file="contacts/contactslist.png" url="#" alt="Contacts list view" caption="Contacts List" %}
<h5>API URL</h5>
<pre>
/api/patients/{patientId}/contacts
</pre>
<h5>GET response</h5>
<pre>
{
name:"Name"
nextOfKin:true
relationship:"Name"
source:"ethercis"
sourceId:"8f8d258c-9c6d-4b94-94f9-c38c58363bbb"
}
</pre>
<h5>Component structure</h5>
<pre>
//component template
let templateContactsList = require('./contacts-list.html');
//controller init
class ContactsListController {
constructor($scope, $state, $stateParams, $ngRedux, contactsActions, serviceRequests, usSpinnerService) {
}
//component init
const ContactsListComponent = {
template: templateContactsList,
controller: ContactsListController
};
//inject services/modules to controller
ContactsListController.$inject = ['$scope', '$state', '$stateParams', '$ngRedux', 'contactsActions', 'serviceRequests', 'usSpinnerService'];
//es6 export for component
export default ContactsListComponent;
</pre>
<h4><a href="https://github.com/PulseTile/PulseTile/blob/master/src/app/pulsetileui/pages/contacts/contacts-detail.component.js">Contacts Detail</a></h4>
{% include image.html file="contacts/contactsdetail.png" url="#" alt="Contacts Detail" caption="Contacts Detail" %}
<h5>API URL</h5>
<pre>
/api/patients/{patientId}/contacts/{sourceId}
</pre>
<h5>GET response</h5>
<pre>
{
author:"c4h_ripple_osi"
contactInformation:234525
dateCreated:1477267200000
name:"Bob McJim"
nextOfKin:""
notes:"sdasdada"
relationship:"Other Brother"
relationshipCode:""
relationshipTerminology:""
relationshipType:""
source:"Marand"
sourceId:"7b6bf9f1-d05b-4d4e-85e3-c120506bb7d3"
}
</pre>
<h5>Component structure</h5>
<pre>
//component template
let templateContactsDetail= require('./contacts-detail.html');
//controller init
class ContactsDetailController {
constructor($scope, $state, $stateParams, $ngRedux, patientsActions, contactsActions, serviceRequests, usSpinnerService) {
}
//component init
const ContactsDetailComponent = {
template: templateContactsDetail,
controller: ContactsDetailController
};
//inject services/modules to controller
ContactsDetailController.$inject = ['$scope', '$state', '$stateParams', '$ngRedux', 'patientsActions', 'contactsActions', 'serviceRequests', 'usSpinnerService'];
//es6 export for component
export default ContactsDetailComponent;
</pre>
{% include image.html file="contacts/contactsedit.png" url="#" alt="Contacts Edit" caption="Contacts Edit" %}
<h5>API URL</h5>
<pre>
/api/patients/{patientId}/contacts/{sourceId}
</pre>
<h5>PUT data</h5>
<pre>
{
author:"c4h_ripple_osi"
contactInformation:234525
dateCreated:1477267200000
dateSubmitted:"2017-04-06T13:59:56.672Z"
name:"Bob McJim"
nextOfKin:""
notes:"sdasdada"
relationship:"Father"
relationshipCode:""
relationshipTerminology:""
relationshipType:"qqq"
source:"Marand"
sourceId:"7b6bf9f1-d05b-4d4e-85e3-c120506bb7d3"
}
</pre>
<h4><a href="https://github.com/PulseTile/PulseTile/blob/master/src/app/pulsetileui/pages/contacts/contacts-create.component.js">Contacts Create</a></h4>
{% include image.html file="contacts/contactscreate.png" url="#" alt="Contacts Create" caption="Contacts Create" %}
<h5>API URL</h5>
<pre>
/api/patients/{patientId}/contacts/{sourceId}
</pre>
<h5>POST data</h5>
<pre>
{
contactInformation:"qqq"
dateSubmitted:"2017-04-06T14:01:09.917Z"
name:"test name"
notes:"qqq"
relationship:"Father"
relationshipCode:"at0039"
relationshipTerminology:"local"
relationshipType:"qqq"
}
</pre>
<h5>Component structure</h5>
<pre>
//component template
let templateContactsCreate= require('./contacts-create.html');
//controller init
class ContactsCreateController {
constructor($scope, $state, $stateParams, $ngRedux, patientsActions, contactsActions, serviceRequests) {
}
//component init
const ContactsCreateComponent = {
template: templateContactsCreate,
controller: ContactsCreateController
};
//inject services/modules to controller
ContactsCreateController.$inject = ['$scope', '$state', '$stateParams', '$ngRedux', 'patientsActions', 'contactsActions', 'serviceRequests'];
//es6 export for component
export default ContactsCreateComponent;
</pre>