Skip to content

Commit

Permalink
(feat) Add in-patient pictogram
Browse files Browse the repository at this point in the history
Adds in-patient pictogram to the pictogram registry. This will be used in the Bed management app.
  • Loading branch information
denniskigen committed Nov 13, 2024
1 parent 01b95ed commit a4afab8
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 26 deletions.
28 changes: 20 additions & 8 deletions packages/framework/esm-framework/docs/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -1183,7 +1183,7 @@ ___

#### Defined in

[packages/framework/esm-styleguide/src/pictograms/pictograms.tsx:48](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/pictograms/pictograms.tsx#L48)
[packages/framework/esm-styleguide/src/pictograms/pictograms.tsx:36](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/pictograms/pictograms.tsx#L36)

___

Expand Down Expand Up @@ -1527,7 +1527,7 @@ ___

#### Defined in

[packages/framework/esm-styleguide/src/pictograms/pictograms.tsx:36](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/pictograms/pictograms.tsx#L36)
[packages/framework/esm-styleguide/src/pictograms/pictograms.tsx:42](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/pictograms/pictograms.tsx#L42)

___

Expand Down Expand Up @@ -1563,6 +1563,16 @@ ___

___

### InPatientPictogram

`Const` **InPatientPictogram**: `MemoExoticComponent`<`ForwardRefExoticComponent`<[`PictogramProps`](API.md#pictogramprops) & `RefAttributes`<`SVGSVGElement`\>\>\>

#### Defined in

[packages/framework/esm-styleguide/src/pictograms/pictograms.tsx:48](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/pictograms/pictograms.tsx#L48)

___

### InformationFilledIcon

`Const` **InformationFilledIcon**: `MemoExoticComponent`<`ForwardRefExoticComponent`<[`IconProps`](API.md#iconprops) & `RefAttributes`<`SVGSVGElement`\>\>\>
Expand Down Expand Up @@ -1609,7 +1619,7 @@ ___

#### Defined in

[packages/framework/esm-styleguide/src/pictograms/pictograms.tsx:60](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/pictograms/pictograms.tsx#L60)
[packages/framework/esm-styleguide/src/pictograms/pictograms.tsx:54](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/pictograms/pictograms.tsx#L54)

___

Expand Down Expand Up @@ -1763,7 +1773,7 @@ ___

#### Defined in

[packages/framework/esm-styleguide/src/pictograms/pictograms.tsx:42](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/pictograms/pictograms.tsx#L42)
[packages/framework/esm-styleguide/src/pictograms/pictograms.tsx:60](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/pictograms/pictograms.tsx#L60)

___

Expand Down Expand Up @@ -1791,7 +1801,7 @@ ___

`Const` **Pictogram**: `MemoExoticComponent`<`ForwardRefExoticComponent`<[`SvgPictogramProps`](API.md#svgpictogramprops) & `RefAttributes`<`SVGSVGElement`\>\>\>

This is a utility type for custom pictograms
This is a utility type for custom pictograms. Please maintain alphabetical order when adding new pictograms for readability.

#### Defined in

Expand Down Expand Up @@ -1885,7 +1895,7 @@ ___

#### Defined in

[packages/framework/esm-styleguide/src/pictograms/pictograms.tsx:54](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/pictograms/pictograms.tsx#L54)
[packages/framework/esm-styleguide/src/pictograms/pictograms.tsx:72](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-styleguide/src/pictograms/pictograms.tsx#L72)

___

Expand Down Expand Up @@ -2418,13 +2428,14 @@ ___

### getLocations

**getLocations**(`tagUuidOrName?`): `Observable`<[`Location`](interfaces/Location.md)[]\>
**getLocations**(`tagUuidOrName?`, `query?`): `Observable`<[`Location`](interfaces/Location.md)[]\>

#### Parameters

| Name | Type | Default value |
| :------ | :------ | :------ |
| `tagUuidOrName` | ``null`` \| `string` | `null` |
| `query` | ``null`` \| `string` | `null` |

#### Returns

Expand Down Expand Up @@ -2908,13 +2919,14 @@ ___

### useLocations

**useLocations**(`tagUuidOrName?`): [`Location`](interfaces/Location.md)[]
**useLocations**(`tagUuidOrName?`, `query?`): [`Location`](interfaces/Location.md)[]

#### Parameters

| Name | Type | Default value |
| :------ | :------ | :------ |
| `tagUuidOrName` | ``null`` \| `string` | `null` |
| `query` | ``null`` \| `string` | `null` |

#### Returns

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { addSvg } from '../svg-utils';
import appointments from './svgs/Appointments-2.svg';
import home from './svgs/Facility-2.svg';
import inPatient from './svgs/in-patient.svg';
import laboratory from './svgs/Labs.svg';
import appointments from './svgs/Appointments-2.svg';
import patientLists from './svgs/Patient Management_Patients.svg';
import serviceQueues from './svgs/service-queues.svg';
import patientRegistration from './svgs/registration.svg';
import serviceQueues from './svgs/service-queues.svg';

export function setupPictograms() {
addSvg('omrs-pict-home', home);
Expand All @@ -13,4 +14,5 @@ export function setupPictograms() {
addSvg('omrs-pict-appointments', appointments);
addSvg('omrs-pict-service-queues', serviceQueues);
addSvg('omrs-pict-registration', patientRegistration);
addSvg('omrs-pict-in-patient', inPatient);
}
38 changes: 22 additions & 16 deletions packages/framework/esm-styleguide/src/pictograms/pictograms.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export type SvgPictogramProps = {
};

/**
* This is a utility type for custom pictograms
* This is a utility type for custom pictograms. Please maintain alphabetical order when adding new pictograms for readability.
*/
export const Pictogram = memo(
forwardRef<SVGSVGElement, SvgPictogramProps>(function Pictogram({ pictogram, pictogramProps }, ref) {
Expand All @@ -33,27 +33,21 @@ export const Pictogram = memo(
}),
);

export const HomePictogram = memo(
forwardRef<SVGSVGElement, PictogramProps>(function HomePictogram(props, ref) {
return <Pictogram ref={ref} pictogram="omrs-pict-home" pictogramProps={props} />;
}),
);

export const PatientListsPictogram = memo(
forwardRef<SVGSVGElement, PictogramProps>(function PatientListsPictogram(props, ref) {
return <Pictogram ref={ref} pictogram="omrs-pict-patient-lists" pictogramProps={props} />;
}),
);

export const AppointmentsPictogram = memo(
forwardRef<SVGSVGElement, PictogramProps>(function AppointmentsPictogram(props, ref) {
return <Pictogram ref={ref} pictogram="omrs-pict-appointments" pictogramProps={props} />;
}),
);

export const ServiceQueuesPictogram = memo(
forwardRef<SVGSVGElement, PictogramProps>(function ServiceQueuesPictogram(props, ref) {
return <Pictogram ref={ref} pictogram="omrs-pict-service-queues" pictogramProps={props} />;
export const HomePictogram = memo(
forwardRef<SVGSVGElement, PictogramProps>(function HomePictogram(props, ref) {
return <Pictogram ref={ref} pictogram="omrs-pict-home" pictogramProps={props} />;
}),
);

export const InPatientPictogram = memo(
forwardRef<SVGSVGElement, PictogramProps>(function InPatientPictogram(props, ref) {
return <Pictogram ref={ref} pictogram="omrs-pict-in-patient" pictogramProps={props} />;
}),
);

Expand All @@ -63,8 +57,20 @@ export const LaboratoryPictogram = memo(
}),
);

export const PatientListsPictogram = memo(
forwardRef<SVGSVGElement, PictogramProps>(function PatientListsPictogram(props, ref) {
return <Pictogram ref={ref} pictogram="omrs-pict-patient-lists" pictogramProps={props} />;
}),
);

export const RegistrationPictogram = memo(
forwardRef<SVGSVGElement, PictogramProps>(function RegistrationPictogram(props, ref) {
return <Pictogram ref={ref} pictogram="omrs-pict-registration" pictogramProps={props} />;
}),
);

export const ServiceQueuesPictogram = memo(
forwardRef<SVGSVGElement, PictogramProps>(function ServiceQueuesPictogram(props, ref) {
return <Pictogram ref={ref} pictogram="omrs-pict-service-queues" pictogramProps={props} />;
}),
);

0 comments on commit a4afab8

Please sign in to comment.