Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(feat) Print patient information with modified configuration #2022

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
323 changes: 323 additions & 0 deletions __mocks__/patient.mock.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,323 @@
export const mockFhirPatient: fhir.Patient = {
resourceType: 'Patient',
id: 'bfa09dac-ec9e-47c1-9ad3-e3ebdd5d722d',
meta: {
versionId: '1719312976000',
lastUpdated: '2024-06-25T10:56:16.000+00:00',
},
text: {
status: 'generated',
div: '<div xmlns="http://www.w3.org/1999/xhtml"><table class="hapiPropertyTable"><tbody><tr><td>Id:</td><td>bfa09dac-ec9e-47c1-9ad3-e3ebdd5d722d</td></tr><tr><td>Identifier:</td><td><div>100008E</div></td></tr><tr><td>Active:</td><td>true</td></tr><tr><td>Name:</td><td> Joshua <b>JOHNSON </b></td></tr><tr><td>Telecom:</td><td> +255777053243 </td></tr><tr><td>Gender:</td><td>MALE</td></tr><tr><td>Birth Date:</td><td>25/09/2019</td></tr><tr><td>Deceased:</td><td>false</td></tr><tr><td>Address:</td><td><span>Wakiso </span><span>Kayunga </span><span>Uganda </span></td></tr></tbody></table></div>',
},
identifier: [
{
id: 'fc6b122a-05bd-4128-8577-7efd8c87cda5',
extension: [
{
url: 'http://fhir.openmrs.org/ext/patient/identifier#location',
valueReference: {
reference: 'Location/736b08f9-94d6-4b50-ad58-6bc69b9cbfb8',
// type: 'Location',
display: 'Ward 50',
},
},
],
use: 'official',
type: {
coding: [
{
code: '05a29f94-c0ed-11e2-94be-8c13b969e334',
},
],
text: 'OpenMRS ID',
},
value: '100008E',
},
],
active: true,
name: [
{
id: '67ac67de-aac4-43b3-a0d4-677578a01047',
text: 'Joshua Johnson',
family: 'Johnson',
given: ['Joshua'],
},
],
telecom: [
{
id: 'f3f3c756-d8f1-42ce-8d32-eefe2a86c306',
value: '+255777053243',
},
],
gender: 'male',
birthDate: '2019-09-25',
deceasedBoolean: false,
address: [
{
id: '1e9df4ab-0c73-4f99-b0bd-c2ddc239619b',
extension: [
{
url: 'http://fhir.openmrs.org/ext/address',
extension: [
{
url: 'http://fhir.openmrs.org/ext/address#address1',
valueString: 'Nansana',
},
],
},
],
use: 'home',
city: 'Wakiso',
state: 'Kayunga',
postalCode: '00000',
country: 'Uganda',
},
{
id: '93167c61-81da-48e1-8a6d-91640a55ed73',
extension: [
{
url: 'http://fhir.openmrs.org/ext/address',
extension: [
{
url: 'http://fhir.openmrs.org/ext/address#address1',
valueString: 'Address16442',
},
],
},
],
use: 'old',
city: 'City6442',
state: 'State6442',
postalCode: '20839',
country: 'Country6442',
},
{
id: '7befd893-a7ed-4080-986a-db5f5d38fda4',
extension: [
{
url: 'http://fhir.openmrs.org/ext/address',
extension: [
{
url: 'http://fhir.openmrs.org/ext/address#address1',
valueString: 'Address16442',
},
],
},
],
use: 'old',
city: 'City6442',
state: 'State6442',
postalCode: '20839',
country: 'Country6442',
},
{
id: 'c0a87353-ab2c-4c39-ae7b-13e992206916',
extension: [
{
url: 'http://fhir.openmrs.org/ext/address',
extension: [
{
url: 'http://fhir.openmrs.org/ext/address#address1',
valueString: 'Address16442',
},
],
},
],
use: 'old',
city: 'City6442',
state: 'State6442',
postalCode: '20839',
country: 'Country6442',
},
{
id: 'b1c92fab-8002-48ed-a1e1-72ab942d12da',
extension: [
{
url: 'http://fhir.openmrs.org/ext/address',
extension: [
{
url: 'http://fhir.openmrs.org/ext/address#address1',
valueString: 'Address16442',
},
],
},
],
use: 'old',
city: 'City6442',
state: 'State6442',
postalCode: '20839',
country: 'Country6442',
},
{
id: 'c85af135-28a4-483d-864d-d97751c21ebd',
extension: [
{
url: 'http://fhir.openmrs.org/ext/address',
extension: [
{
url: 'http://fhir.openmrs.org/ext/address#address1',
valueString: 'Address16442',
},
],
},
],
use: 'old',
city: 'City6442',
state: 'State6442',
postalCode: '20839',
country: 'Country6442',
},
{
id: 'a6a15f40-5cc8-47c0-89ee-8cc39d2c73f5',
extension: [
{
url: 'http://fhir.openmrs.org/ext/address',
extension: [
{
url: 'http://fhir.openmrs.org/ext/address#address1',
valueString: 'Address16442',
},
],
},
],
use: 'old',
city: 'City6442',
state: 'State6442',
postalCode: '20839',
country: 'Country6442',
},
{
id: '72f199fa-f569-42fb-8f5a-bc1c7bed7bb8',
extension: [
{
url: 'http://fhir.openmrs.org/ext/address',
extension: [
{
url: 'http://fhir.openmrs.org/ext/address#address1',
valueString: 'Address16442',
},
],
},
],
use: 'old',
city: 'City6442',
state: 'State6442',
postalCode: '20839',
country: 'Country6442',
},
{
id: '4e0251d4-c00e-4167-ad3e-077c485aa7ec',
extension: [
{
url: 'http://fhir.openmrs.org/ext/address',
extension: [
{
url: 'http://fhir.openmrs.org/ext/address#address1',
valueString: 'Address16442',
},
],
},
],
use: 'old',
city: 'City6442',
state: 'State6442',
postalCode: '20839',
country: 'Country6442',
},
{
id: '1b932ad6-d50a-4c57-a3cf-0fee5b3226fa',
extension: [
{
url: 'http://fhir.openmrs.org/ext/address',
extension: [
{
url: 'http://fhir.openmrs.org/ext/address#address1',
valueString: 'Address16442',
},
],
},
],
use: 'old',
city: 'City6442',
state: 'State6442',
postalCode: '20839',
country: 'Country6442',
},
{
id: '90c59f5a-2cb4-405f-8c2b-0b5d2746d5ae',
extension: [
{
url: 'http://fhir.openmrs.org/ext/address',
extension: [
{
url: 'http://fhir.openmrs.org/ext/address#address1',
valueString: 'Address16442',
},
],
},
],
use: 'old',
city: 'City6442',
state: 'State6442',
postalCode: '20839',
country: 'Country6442',
},
{
id: '810f3756-cb30-4fd8-a729-f6c1a5847312',
extension: [
{
url: 'http://fhir.openmrs.org/ext/address',
extension: [
{
url: 'http://fhir.openmrs.org/ext/address#address1',
valueString: 'Nansana',
},
],
},
],
use: 'old',
city: 'Wakiso',
state: 'Kayunga',
postalCode: '00000',
country: 'Uganda',
},
{
id: '72d21a40-c872-4b99-ac2a-f7b179c4aff2',
extension: [
{
url: 'http://fhir.openmrs.org/ext/address',
extension: [
{
url: 'http://fhir.openmrs.org/ext/address#address1',
valueString: 'Nansana',
},
],
},
],
use: 'old',
city: 'Wakiso',
state: 'Kayunga',
postalCode: '00000',
country: 'Uganda',
},
{
id: '6f7781b2-4b4d-4c69-bde0-98127712aa76',
extension: [
{
url: 'http://fhir.openmrs.org/ext/address',
extension: [
{
url: 'http://fhir.openmrs.org/ext/address#address1',
valueString: 'Nansana',
},
],
},
],
use: 'old',
city: 'Wakiso',
state: 'Kayunga',
postalCode: '00000',
country: 'Uganda',
},
],
};
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"dependencies": {
"@hookform/resolvers": "^3.3.1",
"classnames": "^2.3.2",
"react-barcode": "^1.5.3",
"react-hook-form": "^7.46.2",
"react-to-print": "^2.14.13",
"zod": "^3.22.2"
Expand Down
2 changes: 1 addition & 1 deletion packages/esm-form-entry-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "^2.1.0",
"ngx-build-plus": "^17.0.0",
"openmrs": "next",
"openmrs": "^5.8.2-pre.2324",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we switch this back to next?

"protractor": "~7.0.0",
"rxjs": "^7.8.0",
"style-loader": "2.x",
Expand Down
Loading
Loading